mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-17 09:01:53 +00:00
fix: Don't call onEvent on disabled devices (#23058)
As z2m requires a restart for enable/disable to be effective, we don't need to handle changes at runtime (stop events etc)
This commit is contained in:
@@ -40,6 +40,7 @@ export default class OnEvent extends Extension {
|
||||
}
|
||||
|
||||
private async callOnEvent(device: Device, type: zhc.OnEventType, data: KeyValue): Promise<void> {
|
||||
if (device.options.disabled) return;
|
||||
const state = this.state.get(device);
|
||||
await zhc.onEvent(type, data, device.zh);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user