I assume Home Assistant strips the whitespace at some point before
comparing it to payload_on/payload_off, but I haven't quite found where yet.
I have confirmed Python preserves the whitespace when simply evaluating
the Jinja.
For openHAB, it does not strip the whitespace, causing errors because
it doesn't match the payload_on or payload_off values. At some point I'd
like to bring openHAB inline with Home Assistant, but I need to do so
carefully without breaking something unexpectedly (especially with non-
Home Assistant MQTT integrations). In the meantime, this should fix the
issue in openHAB, without causing issues for Home Assistant or any other
software that follows Home Assistant's MQTT discovery process.
* basic spam control
* used npm run pretty:write
* add test for SPAMMER description to comply with 100% coverage test
* define friendly name to spammer test devices
* Update README.md
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* trying now with throttleit library
* lint corrections
* last lint request
* correct await / async definiction
* remove description support
* change first command to be executed
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* Fire event when group gets removed
* Add a unit test for the new behavior
* Make prettier happy
* Add missing return type
* Merge device and group removal events
* Unbreak bridgeLegacy.ts
* Update homeassistant.ts
* Update bridge.ts
* Update bridge.ts
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* Added function to override payloads for non-conforming devices
* override implementation for Bosch BTH-RA
* unit test including mockup for this device
* Experimental and broken integration of overrideHaConfig
* Not working experiments; mqtt publish debug output
* fixes
* Updates
* fix
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* fix: OTA loses version info for develco/frient
This fix is not perfect, as it will still print that it got updated from null to null.
We just moved the reconfigure later, which will trigger this https://github.com/Koenkk/zigbee-herdsman-converters/blob/000041cba216822dab151151c493b560678da91a/src/devices/develco.ts#L36
for develco/frient devices that have it in their configure. (Which should be all of them)
Of note though, ZCL marks both dateCode and swBuildId as optional attributes, so Develco/Frient returning UNSUPPORTED_ATTRIBUTE here is not outside of spec. Although I'm not sure there is a cleaner way to do this.
* Update otaUpdate.test.js
* Update otaUpdate.ts
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* exclude homeassistant entries from null cleanup
* Add a test
* Don't hardcode the exclude list, add one more test
* implement suggested changes as per review
* Differentiate the spammy "MQTT publish"/"received MQTT message" from regular logs
Rather than creating subnamespaces, keep the z2m:mqtt logger namespace only for those 2 , move back to z2m default for the rest.
* fix tests