Forked from seamus65/zha_moes_smart_knob_lights.yaml
Created
July 15, 2022 18:41
Revisions
-
seamus65 revised this gist
Apr 8, 2022 . 1 changed file with 22 additions and 434 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 @@ -45,7 +45,7 @@ action: command: '{{ trigger.event.data.command }}' cluster_id: '{{ trigger.event.data.cluster_id }}' endpoint_id: '{{ trigger.event.data.endpoint_id }}' args: '{% if trigger.event.data.args[0] == 0 %} 0 {% elif trigger.event.data.args[0] == 1 %} 1 {% elif trigger.event.data.args[0] == 3 %} 3 {% endif %}' - choose: - conditions: - '{{ command == ''toggle'' }}' @@ -56,475 +56,63 @@ action: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == 0 }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 2 }}" sequence: - service_template: light.turn_on target: !input 'light' data_template: brightness_step_pct: 5 transition: 0.5 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == 1 }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 2 }}" sequence: - service_template: light.turn_on target: !input 'light' data_template: brightness_step_pct: -5 transition: 0.5 - conditions: - '{{ command == ''step_color_temp'' }}' - '{{ cluster_id == 768 }}' - '{{ endpoint_id == 1 }}' - '{{ args == 1 }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 2 }}" sequence: - service_template: light.turn_on target: !input 'light' data_template: brightness_step_pct: 20 transition: 0.5 - conditions: - '{{ command == ''step_color_temp'' }}' - '{{ cluster_id == 768 }}' - '{{ endpoint_id == 1 }}' - '{{ args == 3 }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 2 }}" sequence: - service_template: light.turn_on target: !input 'light' data_template: brightness_step_pct: -20 transition: 0.5 -
seamus65 revised this gist
Jan 20, 2022 . 1 changed file with 3 additions and 1 deletion.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 @@ -5,7 +5,9 @@ blueprint: You can set functions for a single press. This allows you to assign, e.g., a scene or anything else. Rotating left/right will change the brightness smoothly of the selected light. Not all functionality of the device is available at time of writing, e.g. double press, long press and press and rotate.' domain: automation input: -
seamus65 revised this gist
Jan 20, 2022 . 1 changed file with 1 addition and 1 deletion.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 @@ -30,7 +30,7 @@ blueprint: default: [] selector: action: {} source_url: https://gist.github.com/seamus65/939a147634942dd885c8704334627f93 mode: restart max_exceeded: silent trigger: -
seamus65 created this gist
Jan 20, 2022 .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,528 @@ blueprint: name: ZHA - Moes Smart Knob for lights description: 'Control lights with a Moes Smart Knob. You can set functions for a single press. This allows you to assign, e.g., a scene or anything else. Rotating left/right will change the brightness smoothly of the selected light.' domain: automation input: remote: name: Remote description: Moes Knob to use selector: device: integration: zha manufacturer: _TZ3000_4fjiwweb model: TS004F light: name: Light(s) description: The light(s) to control selector: target: entity: domain: light single_press: name: Single press description: Action to run on single press default: [] selector: action: {} source_url: https://gist.github.com/seamus65/0cd586edfee2e245e0b7e8081c5865f1 mode: restart max_exceeded: silent trigger: - platform: event event_type: zha_event event_data: device_id: !input 'remote' action: - variables: command: '{{ trigger.event.data.command }}' cluster_id: '{{ trigger.event.data.cluster_id }}' endpoint_id: '{{ trigger.event.data.endpoint_id }}' args: '{{ trigger.event.data.args }}' - choose: - conditions: - '{{ command == ''toggle'' }}' - '{{ cluster_id == 6 }}' - '{{ endpoint_id == 1 }}' sequence: !input 'single_press' - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 13, 1] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 2 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 5 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 25, 1] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 3 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 5 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 37, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 5 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 5 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 49, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 3 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 61, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 5 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 73, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 85, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 97, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 109, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 121, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 133, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 145, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 157, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [0, 169, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: 10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 13, 1] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 2 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -5 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 25, 1] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 3 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -5 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 37, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 5 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -5 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 49, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 3 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 61, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 5 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 73, 2] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 85, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 97, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 109, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 121, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 133, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 145, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 157, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1 - conditions: - '{{ command == ''step'' }}' - '{{ cluster_id == 8 }}' - '{{ endpoint_id == 1 }}' - '{{ args == [1, 169, 3] }}' sequence: - repeat: while: - condition: template value_template: "{{ repeat.index < 10 }}" sequence: - service: light.turn_on target: !input 'light' data: brightness_step_pct: -10 transition: 0.5 - delay: 0.1