This is the blueprint for the latest version of the Remote Switch model remote.b186acn02 based on the blueprint for the double rocker (Xiaomi_aqara - Aqara Wireless Remote Switch (Double Rocker))
blueprint:
name: xiaomi_aqara - Aqara Wireless Remote Switch (Single Rocker)
description: Automate your Xiaomi Aqara Wireless Remote Switch (Single Rocker) using xiaomi events.
domain: automation
input:
aqara_single_switch:
name: Select the Aqara Wireless Remote Switch (Single Rocker)
description: Aqara Wireless Remote Switch (Single Rocker)
selector:
device:
entity:
- integration: xiaomi_aqara
filter:
- model: remote.b186acn02
multiple: false
button_single_press:
name: Single Press
description: Action to run on single press
default: []
selector:
action: {}
button_double_press:
name: Double Press
description: Action to run on double press
default: []
selector:
action: {}
button_long_press:
name: Long Press
description: Action to run when button is long pressed (held down)
default: []
selector:
action: {}
source_url: https://community.home-assistant.io/t/aqara-wireless-remote-switch-single-rocker-via-xiaomi-aqara-integration/878020
mode: restart
max_exceeded: silent
variables:
aqara_single_switch: !input aqara_single_switch
triggers:
- trigger: event
event_type: xiaomi_aqara.click
conditions:
- condition: template
value_template: '{{ device_id(trigger.event.data.entity_id) == aqara_single_switch
}}'
alias: Check for device_id
actions:
- variables:
click_type: '{{ trigger.event.data.click_type }}'
entity_id: '{{ trigger.event.data.entity_id }}'
- choose:
- conditions:
- '{{ click_type == ''single'' }}'
sequence: !input button_single_press
- conditions:
- '{{ click_type == ''double'' }}'
sequence: !input button_double_press
- conditions:
- '{{ click_type == ''long'' }}'
sequence: !input button_long_press