Last active
January 11, 2026 19:02
-
-
Save jahir/cad805d06be9043ab22215ef7384463e to your computer and use it in GitHub Desktop.
Home Assistant cover control
This file contains hidden or 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: | |
| domain: automation | |
| name: Cover control with multiple remotes | |
| description: Open and close a cover with a simple Tradfri on/off controls | |
| input: | |
| remote_ids: | |
| name: Remotes | |
| description: The remotes that will control the cover | |
| selector: | |
| device: | |
| integration: zha | |
| manufacturer: 'IKEA of Sweden' | |
| model: 'TRADFRI on/off switch' | |
| multiple: true | |
| cover_id: | |
| name: Cover | |
| description: The cover to control | |
| selector: | |
| entity: | |
| filter: | |
| domain: cover | |
| multiple: false | |
| mode: restart | |
| trigger: | |
| - platform: event | |
| event_type: zha_event | |
| id: trigger.event.data.command | |
| variables: | |
| remotes: !input remote_ids | |
| condition: | |
| - condition: template | |
| value_template: "{{ trigger.event.data.device_id in remotes }}" | |
| action: | |
| - variables: | |
| command: '{{ trigger.event.data.command }}' | |
| - choose: | |
| # close | |
| - conditions: "{{ command == 'off' }}" | |
| sequence: | |
| - if: | |
| - condition: state | |
| entity_id: !input cover_id | |
| state: | |
| - closing | |
| - opening | |
| then: | |
| - service: cover.stop_cover | |
| target: | |
| entity_id: !input cover_id | |
| data: {} | |
| else: | |
| - service: cover.close_cover | |
| target: | |
| entity_id: !input cover_id | |
| data: {} | |
| # open | |
| - conditions: "{{ command == 'on' }}" | |
| sequence: | |
| - if: | |
| - condition: state | |
| entity_id: !input cover_id | |
| state: | |
| - closing | |
| - opening | |
| then: | |
| - service: cover.stop_cover | |
| target: | |
| entity_id: !input cover_id | |
| data: {} | |
| else: | |
| - service: cover.open_cover | |
| target: | |
| entity_id: !input cover_id | |
| data: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment