Xiaomi Aqara wireless switch

Hi all
Just bought this switch and was wondering if the state of this switch is exposed

i can use the click event to fire automation, but in the developer console the state always says off

if i try any automation using state, nothing happens

Does anyone know if the states for this switch can be monitored

Iirc all the xiaomi switches are momentary, so they don’t have a state. Instead you get events when the buttons are pressed/clicked.

There are plenty of examples on here - eg from @badgerhome in the past few days…

this is my single switch automation

alias: Landing
trigger:
  - platform: event
    event_type: click
    event_data:
      entity_id: binary_sensor.wall_switch_158d0001830ce8
      click_type: single

action:
  - service: light.toggle
    entity_id: light.landing
2 Likes