Last active
July 5, 2022 19:13
-
-
Save dnmgns/01b5c2181cc26d10b148c01025c62c66 to your computer and use it in GitHub Desktop.
ikea_on_off_switch hassio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: '1656791019411' | |
alias: deConz - IKEA wireless on/off switch | |
description: '' | |
use_blueprint: | |
path: homeassistant/ikea_on_off_switch.yaml | |
input: | |
remote: d91401d57144d4abbdd27f2e7deae1d5 | |
button_on_short: | |
- type: turn_on | |
device_id: 7e65565b9462ee5442700ebac6d3450e | |
entity_id: switch.on_off_plug_in_unit_5 | |
domain: switch | |
button_off_short: | |
- type: turn_off | |
device_id: 7e65565b9462ee5442700ebac6d3450e | |
entity_id: switch.on_off_plug_in_unit_5 | |
domain: switch | |
button_on_long: | |
- service: fan.turn_on | |
data: | |
percentage: 75 | |
target: | |
entity_id: fan.xiaomi_smart_fan | |
button_off_long: | |
- service: fan.turn_off | |
data: {} | |
target: | |
entity_id: fan.xiaomi_smart_fan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: deConz - IKEA wireless on/off switch | |
description: Control anything using IKEA wireless on/off switch | |
domain: automation | |
input: | |
remote: | |
name: switch | |
description: IKEA wireless on/off switch to use | |
selector: | |
device: | |
integration: deconz | |
manufacturer: IKEA of Sweden | |
model: TRADFRI on/off switch | |
button_on_short: | |
name: On button press | |
description: Action to run on press of On button | |
default: [] | |
selector: | |
action: | |
button_off_short: | |
name: Off button press | |
description: Action to run on press of Off button | |
default: [] | |
selector: | |
action: | |
button_on_long: | |
name: On button hold | |
description: Action to run on long press of On button | |
default: [] | |
selector: | |
action: | |
button_off_long: | |
name: Off button hold | |
description: Action to run on long press of Off button | |
default: [] | |
selector: | |
action: | |
button_on_release: | |
name: On button release | |
description: Action to run on release long press of On button | |
default: [] | |
selector: | |
action: | |
button_off_release: | |
name: Off button release | |
description: Action to run on release long press of Off button | |
default: [] | |
selector: | |
action: | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: event | |
event_type: deconz_event | |
event_data: | |
device_id: !input remote | |
action: | |
- variables: | |
event: "{{ trigger.event.data.event }}" | |
- choose: | |
- conditions: | |
- "{{ event == 1002 }}" | |
sequence: !input button_on_short | |
- conditions: | |
- "{{ event == 2002 }}" | |
sequence: !input button_off_short | |
- conditions: | |
- "{{ event == 1001 }}" | |
sequence: !input button_on_long | |
- conditions: | |
- "{{ event == 2001 }}" | |
sequence: !input button_off_long | |
- conditions: | |
- "{{ event == 1003 }}" | |
sequence: !input button_on_release | |
- conditions: | |
- "{{ event == 2003 }}" | |
sequence: !input button_off_release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment