Because of how it shares a channel, whenever openHAB was rebooted and it
would first restore the device trigger components from the channel configuration,
and then from the MQTT message, it didn't identify it as the same component
as before, and so would merge into another instance of itself. My Things.json
is normally 13MB, and had grown to 545MB, and my openHAB was constantly having
memory issues! So now just make sure we only keep unique information, which
will automatically clean up anyone in a bad state.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
* [mqtt.homeassistant] Update Jinjava to 2.7.4
Which includes support for break/continue, which is what Zigbee2MQTT's
new event component uses in their template.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* update bndrun file
Signed-off-by: Cody Cutrer <cody@cutrer.us>
---------
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
* fix step math so that the state description represents the step
scaled to 0-100%
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
* [mqtt.homeassistant] fix duplicate component resolution when unique_id is set
unique_id is only unique per component type. so we need to a) take that into
account, and b) use that when resolving duplicates
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
* Added support for humidity and preset_modes
Signed-off-by: Václav Čejka <V.Cejka@seznam.cz>
Signed-off-by: VasekCejka <150804231+VasekCejka@users.noreply.github.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
* [mqtt.homeassistant] bring AlarmControlPanel in line with current documentation
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
also fix the conditional for JSON attributes on other components,
and make the channel read only.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
but only for newStyleChannels, which is already a breaking change of
most channels getting renamed for 4.3 anyway
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Use the `subtype` field to collapse multiple DeviceAutomation components into
a single channel.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
if multiple DeviceTrigger components share a topic, and each
has a payload value configured, only messages matching that
payload should be delivered to the corresponding channel
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
In particular, use the color_mode attribute to tell us which color space to parse in,
instead of trying to guess. Some devices will fill out attributes not-pertinent to
the current color mode, and their math might be... less than optimal.
Also sync color temp and color channels when the color_mode is the opposite.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
* [mqtt.homeassistant] Fix jinja usage in availability templates
Use the local Jinjava, instead of implicitly depending on the Jinja
transformation service.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
While it's useful in general to not have to copy/paste a MQTT message into a JSON
parser to verify syntax, it also includes details about fields that are the wrong
data type that a generic JSON parser won't catch. A la #17375.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
* [mqtt.generic] Support chaining transformations without an intersection symbol
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>