* Add function resolveEntityByID() function as an improved alternative for parseEntityID()
* Port deviceGroupMembership.ts from parseEntityID() to resolveEntityByID()
* Migrade groups.ts from parseEntityID() to resolveEntityByID()
* Improve test coverage on groups functionality
* Migrate from parseEntityID() to resolveEntityByID() for bridge functionality
* Migrate from parseEntityID() to resolveEntityByID() for bind functionality
* Finally get rid of parseEntityID() function
* Fix linter issues
* Move resolveEntityAndEndpoint() function to zigbee.ts
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* Add endpoint matching based on the endpoint names list in the device definition
* Cleanup debug prints
* Correct creating endpoint names list, filter out null elements
* Correct test due to slightly changed behavior
* Fix endpoint name lookup when converter does not provide full name-to-id mapping
* Simplify topic name matching
* Remove obsolete branches, improve code coverage
* Make linter happy
* Make linter happy
* Remove dependency on endpoint names while removing device from all groups
* Get rid of predefined list of endpoints when processing group state update
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* emit event on converter triggers
* use meta.deviceExposesChanged() instead
* add ExposesChanged event for homeassistant discovery
* add tests for receive.ts and homeassistant.ts
* Always return an object when loading a YAML file, even when it is empty or containing the `null` value.
Fixes#20283
* Add unit test for having multiple device files, with one is empty. This test breaks without the proposed.
* Simplify getDiscoverKey
* Add support for discovering bridge entities
* Add automatic discovery for bridge
* Make availability configurable and disable it
for `connection_state` entity
* Link devices & groups to bridge
* Additional entities (and some clean-up)
* Add device info for Zigbee Groups
* Move Scene and getScenes to utils.ts
* Add auto-discovery for group scenes
* Update scene auto-discovery on change
* Add support for single endpoint scenes
* Add test for onScenesChanged
* Move Scene to types.d.ts
* Allow optional object_id_postfix key in payload
* Add scene name to object_id for nicer HA entity_id
* Use QOS1 for rarely sent messages
Specifically discovery and availability depending on the set up, it's possible for these messages to be silently discarded by the broker.
Sending them as QOS1 means the mqtt library used will resend them until it gets an ACK.
Ensuring delivery is particularly important for messages that are rarely sent like discovery or availability as they are only sent when there are changes, and nondelivery or dropped messages for them impede proper functioning in home assistant.
* Fix tests for discovery and availability using QOS1