Last active
February 13, 2021 13:09
-
-
Save boelle/c4f2145262591d51e65db4f1bd482c13 to your computer and use it in GitHub Desktop.
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: Shutter Remote with Ikea Tradfri 2B | |
description: | | |
Control a shutter with an Ikea Tradfri two button remote over deconz. | |
Tested with this esphome code: https://gist.github.com/boelle/b08c2c78948f243f9a44a551cb0f4775 | |
Short press on I button will toggle the shutter state. | |
Short press on 0 button will stop the shutter. | |
Long press on I button will open the shutter. | |
Long press on 0 button will close the shutter. | |
domain: automation | |
input: | |
remote: | |
name: Remote | |
description: IKEA 2btn remote to use | |
selector: | |
device: | |
integration: deconz | |
manufacturer: IKEA of Sweden | |
model: TRADFRI on/off switch | |
cover: | |
name: Shutter | |
description: The shutter to control | |
selector: | |
target: | |
entity: | |
domain: cover | |
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: | |
- service: cover.toggle | |
target: !input cover | |
- conditions: | |
- "{{ event == 2002 }}" | |
sequence: | |
- service: cover.stop_cover | |
target: !input cover | |
- conditions: | |
- "{{ event == 1003 }}" | |
sequence: | |
- service: cover.close_cover | |
target: !input cover | |
- conditions: | |
- "{{ event == 2003 }}" | |
sequence: | |
- service: cover.open_cover | |
target: !input cover | |
mode: restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment