-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix!: Refactor onEvent #9650
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
base: master
Are you sure you want to change the base?
fix!: Refactor onEvent #9650
Conversation
And merge with Koenkk/zigbee-herdsman#1459 & #9679 too for break grouping 😬 |
deviceExposesChanged: () => void; | ||
} | ||
export namespace OnEvent { | ||
export type BaseData = {device: Zh.Device; deviceExposesChanged: () => void; state: KeyValue; options: KeyValue}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about naming this DeviceData
to avoid confusion? (Also fits with the fact it's only used when the event is device[...]
.)
With breaking I meant the zhc api breaking (causing a new major zhc release), AFAIK #9679 doesn't break the zhc api? |
External converters could be using the cluster name (it's the ZH part that's technically breaking though). |
This PR refactors the
onEvent
:message
onEvent event, existing usages have been refactored to fromZigbee convertersThis is a breaking change, clients have to update the
onEvent
calls according to the new types and have to make sure that thestart
event is always emitted before any other event on thedefinition.onEvent()
.To be merged together with #9693 to prevent 2 breaking change releases in a row.
TODO:
onEvent()
and fixonEvent(stop)
not being called when device is force removed zigbee2mqtt#27984)