Last active
December 17, 2024 06:09
-
-
Save jeffreykog/362ccd662176097255d0eeb8a46bad22 to your computer and use it in GitHub Desktop.
Revisions
-
jeffreykog revised this gist
Aug 19, 2024 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -41,6 +41,12 @@ max_exceeded: silent trigger: - platform: state entity_id: !input remote_entity from: '' to: '1_initial_press' - platform: state entity_id: !input remote_entity from: '' to: '2_initial_press' action: - variables: window_sensor_entity: !input window_sensor_entity -
jeffreykog revised this gist
Aug 19, 2024 . 1 changed file with 16 additions and 15 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -41,7 +41,6 @@ max_exceeded: silent trigger: - platform: state entity_id: !input remote_entity action: - variables: window_sensor_entity: !input window_sensor_entity @@ -56,26 +55,28 @@ action: state: closing then: - action: cover.stop_cover target: entity_id: !input cover_entity else: - if: - condition: template value_template: "{{ trigger.to_state.state == \"1_initial_press\" }}" then: - if: - condition: template value_template: "{{ window_sensor_entity is none or is_state(window_sensor_entity, 'off') }}" then: - action: cover.open_cover target: entity_id: !input cover_entity - if: - condition: template value_template: "{{ trigger.to_state.state == \"2_initial_press\" }}" then: - if: - condition: template value_template: "{{ window_sensor_entity is none or is_state(window_sensor_entity, 'off') }}" then: - action: cover.close_cover target: entity_id: !input cover_entity -
jeffreykog revised this gist
Aug 19, 2024 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -41,6 +41,7 @@ max_exceeded: silent trigger: - platform: state entity_id: !input remote_entity from: '' action: - variables: window_sensor_entity: !input window_sensor_entity -
jeffreykog renamed this gist
Aug 19, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jeffreykog created this gist
Aug 19, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,80 @@ blueprint: name: IKEA Somrig Cover Control (Z2M) description: "## Control any cover with IKEA Somrig shortcut button Should be used with Zigbee2MQTT Available controls: - Single dot: Open cover - Double dot: Close cover - While the cover is moving, press any button to stop the movement " source_url: https://gist.github.com/jeffreykog/f5d9db269c52b55e87a93c0097e8400a domain: automation input: remote_entity: name: Somrig Remote Action Entity description: The "Action" entity of the Somrig remote, as created by Zigbee2MQTT selector: entity: filter: - integration: mqtt domain: sensor cover_entity: name: Cover entity description: The cover entity that should be controlled by the Somrig remote. selector: entity: filter: - domain: cover window_sensor_entity: name: Open window sensor description: Optional window sensor entity. Movement of the cover will be blocked when the window is open. default: selector: entity: filter: - domain: binary_sensor device_class: door mode: single max_exceeded: silent trigger: - platform: state entity_id: !input remote_entity action: - variables: window_sensor_entity: !input window_sensor_entity - if: - condition: or conditions: - condition: state entity_id: !input cover_entity state: opening - condition: state entity_id: !input cover_entity state: closing then: - action: cover.stop_cover metadata: {} data: {} target: entity_id: !input cover_entity else: - if: - condition: template value_template: "{{ trigger.to_state.state == \"1_initial_press\" and (window_sensor_entity is none or is_state(window_sensor_entity, 'off')) }}" then: - action: cover.open_cover metadata: {} data: {} target: entity_id: !input cover_entity - if: - condition: template value_template: "{{ trigger.to_state.state == \"2_initial_press\" and (window_sensor_entity is none or is_state(window_sensor_entity, 'off')) }}" then: - action: cover.close_cover metadata: {} data: {} target: entity_id: !input cover_entity