Hi,
Long time lurker, first time poster.
I have a weird issue after adding my Xiaomi Aqara wall switch (single switch) and using it to toggle two lights in my living room.
It seems that any event_type: click
with click_type: single
will trigger the automation with the above switch.
Here’s the code:
- alias: "Stue_veggbryter"
trigger:
- platform: event
event_type: click
event_data:
event_id: binary_sensor.wall_switch_158d00017101a2
click_type: single
action:
- service: homeassistant.toggle
entity_id: group.stuelys
I have a couple of round xiaomi switches, and triggering “single” click with any of these also toggles my living room lights, even my xiaomi switch acting as a doorbell (which isn’t even touched in HASS).
Anyone seen similar issues, or see something weird with my above automation? I have tried re-writing the automation many times w/o any luck. The log looks correct, meaning that the xiaomi gateway sends the correct event to HASS.
HASS: 0.59 (w/ debug enabled on xiaomi components)
Xiaomi GW firmware: Latest (released last month)
edit: Yeah… I screwed up the config file…
This was embarrassing. I even injected extra debugging into the binary-switch .py files before noticing I’ve written the routine incorrectly.
Changed:
event_id: binary_sensor.wall_switch_158d00017101a2
To the correct formatting:
entity_id: binary_sensor.wall_switch_158d00017101a2
Now all is nice and dandy.
Thanks for this sweet piece of software, devs!
Cheers,
Håkon