Skip to content

Instantly share code, notes, and snippets.

@paullessing
Last active October 18, 2023 16:48
Show Gist options
  • Save paullessing/0851e4855ec9a4b257b9dde0903d02be to your computer and use it in GitHub Desktop.
Save paullessing/0851e4855ec9a4b257b9dde0903d02be to your computer and use it in GitHub Desktop.
TRADFRI Remote blueprint - Home Assistant
blueprint:
name: Cover control with Tradfri open/close remote Z2M
description: |
Control a cover with an Ikea Tradfri open/close button remote over Zigbee2MQTT
Short press on ☼ button will open the cover.
Short press on ☰ button will close the cover.
Long press on ☼ or ☰ will stop the cover.
domain: automation
input:
remote:
name: Remote
description: "IKEA open/close remote to use"
selector:
entity:
domain: sensor
multiple: false
cover:
name: Cover
description: The cover to control
default:
entity_id: none
selector:
entity:
domain: cover
trigger:
- platform: state
entity_id:
- !input remote
to: 'open'
id: 'open'
- platform: state
entity_id:
- !input remote
to: 'close'
id: 'close'
- platform: state
entity_id:
- !input remote
to: 'stop'
id: 'stop'
action:
- choose:
- conditions:
- condition: trigger
id: 'open'
sequence:
- service: cover.open_cover
target:
entity_id: !input cover
- conditions:
- condition: trigger
id: 'close'
sequence:
- service: cover.close_cover
target:
entity_id: !input cover
- conditions:
- condition: trigger
id: 'stop'
sequence:
- service: cover.stop_cover
target:
entity_id: !input cover
mode: restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment