Hi, I’m using a xiaomi push button that provides those actions in the device:
Those are 8 “actions” possible for the button.
I can create 8 seperate automations to do different stuff but I hate multiplying all those automations.
I wish I could trigger an “event” just when any one of those 8 are triggered, then I could derive an input select for example.
The below code doesn’t make sense but I’m so wanting to have devices from that entity. Might be a bit OCD on this
Any suggestions I haven’t thought of?
alias: Pushing this button
description: ''
mode: single
trigger:
- device_id: 1257adde0d5011ebb75103825dfc9901
domain: deconz
platform: device
type: ALL ACTIONS TRIGGER THIS
condition: []
action:
- choose:
- conditions:
- condition: ONE PRESS HAS HAPPEND
sequence:
- service: input_select.select_option
data:
option: 1
entity_id: input_select.lloyd_switch_bed
- choose:
- conditions:
- condition: TWO PRESS HAS HAPPEND
sequence:
- service: input_select.select_option
data:
option: 2
entity_id: input_select.lloyd_switch_bed
default: []