I have a bunch of switches in my network, Hue Dimmer Switches, Hue Wall Switches, various ikea switches. They control my lights and have been working great all the time, both with regular automations, NodeRED and pyScript.
But after some update this autumn, can’t remember which, I’ve had a lag of what feels like a second or so on every switch! Bad enugh that you press twice and instead of turning on the light you toggle it on-off… Didn’t have time to investigate further, but wife was not happy and started mumbling something like “why can we have regular light switches like normal ppl”…
So now I started to investigate and it seems like the zha_events that I use to trigger are delayed by about 400-500ms.
Looking at the timestamps in the events output from one button press of a Hue Dimmer Switch below i can clearly see that the events I use, command: on_short_release
, is a lot later.
- Event 0,
command: "on"
@ 19:58:12.056082 - Event 1,
command: on_press
@ 19:58:12.484270, ~430 ms after event 0 - Event 2,
command: on_short_release
@ 19:58:12.485157, ~430 ms after event 0
The fast events, at least for Hue Dimmer Switches seems to be the ones with command “on”, “off_with_effect” and “step”.
"Listen to events" output
# Event 0:
event_type: zha_event
data:
device_ieee: 00:17:88:01:08:f0:73:95
unique_id: 00:17:88:01:08:f0:73:95:1:0x0006
device_id: 191a0aa1f7dd36764fddc3a92156f5ec
endpoint_id: 1
cluster_id: 6
command: "on"
args: []
params: {}
origin: LOCAL
time_fired: "2025-01-03T19:58:12.056082+00:00"
context:
id: 01JGPVYC2RBP0Y3DEHTNG2SWX2
parent_id: null
user_id: null
# Event 1:
event_type: zha_event
data:
device_ieee: 00:17:88:01:08:f0:73:95
unique_id: 00:17:88:01:08:f0:73:95:2:0xfc00
device_id: 191a0aa1f7dd36764fddc3a92156f5ec
endpoint_id: 2
cluster_id: 64512
command: on_press
args:
button: "on"
press_type: press
command_id: 0
duration: 1
args:
- 1
- 3145728
- 0
- 33
- 1
params: {}
origin: LOCAL
time_fired: "2025-01-03T19:58:12.484270+00:00"
context:
id: 01JGPVYCG4R8D2CAW8XD9QZA9Y
parent_id: null
user_id: null
# Event 2:
event_type: zha_event
data:
device_ieee: 00:17:88:01:08:f0:73:95
unique_id: 00:17:88:01:08:f0:73:95:2:0xfc00
device_id: 191a0aa1f7dd36764fddc3a92156f5ec
endpoint_id: 2
cluster_id: 64512
command: on_short_release
args:
button: "on"
press_type: short_release
command_id: 0
duration: 1
args:
- 1
- 3145728
- 2
- 33
- 1
params: {}
origin: LOCAL
time_fired: "2025-01-03T19:58:12.485157+00:00"
context:
id: 01JGPVYCG5YE9ZTTT6NEBQMH1S
parent_id: null
user_id: null
After changing the events to use the one that comes first my hue dimmer switches are instant again .
But unfortunately the Hue Wall Switches (in rocker mode) only report command: xxx_short_release
which is the laggy event
So is there any wayt to remedy this? Is it a bug in zha/ha?