Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Ability to trigger events from converters on incoming Zigbee messages #20776

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

slugzero
Copy link
Contributor

This is the complementing z2m PR for Koenkk/zigbee-herdsman-converters#6869. CI will pass once that one is merged.

It introduces a new meta.deviceExposesChanged() which converters can call from inside fromZigbee convert() to request a re-evaluation and re-publishing of a dynamic expose()

The DevicesChanged event is emitted to publish zigbee2mqtt/bridge/devices). I had to add another new emitExposesChanged event for the Home Assistant extension, because I did not want to change its behavior too much: The only event that leads to force-sending out a new discovery message is DeviceOptionsChanged.

@slugzero slugzero changed the title Zhc events Feature: Ability to trigger events from converters on incoming Zigbee messages Jan 13, 2024
@slugzero slugzero marked this pull request as ready for review January 13, 2024 20:29
@Koenkk
Copy link
Owner

Koenkk commented Jan 15, 2024

Thanks!

@Koenkk Koenkk merged commit 0007db4 into Koenkk:dev Jan 15, 2024
1 of 8 checks passed
@slugzero slugzero deleted the zhc-events branch January 17, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants