Xiaomi Wireless Button
Available events are single, double, hold, long_click_press and long_click_release. For Square version (Aqara brand) only single and double events are supported. Furthermore the space between two clicks to generate a double click must be quite large now.
- alias: Toggle dining light on single press
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d000xxxxxc2
click_type: single
action:
service: switch.toggle
entity_id: switch.wall_switch_left_158d000xxxxx01
- alias: Toggle couch light on double click
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d000xxxxxc2
click_type: double
action:
service: switch.toggle
entity_id: switch.wall_switch_right_158d000xxxxx01
- alias: Let a dog bark on long press
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d000xxxxxc2
click_type: long_click_press
action:
service: xiaomi_aqara.play_ringtone
data:
gw_mac: xxxxxxxxxxxx
ringtone_id: 8
ringtone_vol: 8