Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @seamus65 seamus65 revised this gist Apr 8, 2022. 1 changed file with 22 additions and 434 deletions.
    456 changes: 22 additions & 434 deletions zha_moes_smart_knob_lights.yaml
    Original 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: '{{ trigger.event.data.args }}'
    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, 13, 1] }}'
    - '{{ args == 0 }}'
    sequence:
    - repeat:
    while:
    - condition: template
    value_template: "{{ repeat.index < 2 }}"
    sequence:
    - service: light.turn_on
    - service_template: light.turn_on
    target: !input 'light'
    data:
    data_template:
    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] }}'
    - '{{ args == 1 }}'
    sequence:
    - repeat:
    while:
    - condition: template
    value_template: "{{ repeat.index < 2 }}"
    sequence:
    - service: light.turn_on
    - service_template: light.turn_on
    target: !input 'light'
    data:
    data_template:
    brightness_step_pct: -5
    transition: 0.5
    - delay: 0.1
    - conditions:
    - '{{ command == ''step'' }}'
    - '{{ cluster_id == 8 }}'
    - '{{ command == ''step_color_temp'' }}'
    - '{{ cluster_id == 768 }}'
    - '{{ endpoint_id == 1 }}'
    - '{{ args == [1, 25, 1] }}'
    - '{{ args == 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 }}"
    value_template: "{{ repeat.index < 2 }}"
    sequence:
    - service: light.turn_on
    - service_template: light.turn_on
    target: !input 'light'
    data:
    brightness_step_pct: -10
    data_template:
    brightness_step_pct: 20
    transition: 0.5
    - delay: 0.1
    - conditions:
    - '{{ command == ''step'' }}'
    - '{{ cluster_id == 8 }}'
    - '{{ command == ''step_color_temp'' }}'
    - '{{ cluster_id == 768 }}'
    - '{{ endpoint_id == 1 }}'
    - '{{ args == [1, 169, 3] }}'
    - '{{ args == 3 }}'
    sequence:
    - repeat:
    while:
    - condition: template
    value_template: "{{ repeat.index < 10 }}"
    value_template: "{{ repeat.index < 2 }}"
    sequence:
    - service: light.turn_on
    - service_template: light.turn_on
    target: !input 'light'
    data:
    brightness_step_pct: -10
    transition: 0.5
    - delay: 0.1
    data_template:
    brightness_step_pct: -20
    transition: 0.5
  2. @seamus65 seamus65 revised this gist Jan 20, 2022. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion zha_moes_smart_knob_lights.yaml
    Original 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.'
    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:
  3. @seamus65 seamus65 revised this gist Jan 20, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion zha_moes_smart_knob_lights.yaml
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,7 @@ blueprint:
    default: []
    selector:
    action: {}
    source_url: https://gist.github.com/seamus65/0cd586edfee2e245e0b7e8081c5865f1
    source_url: https://gist.github.com/seamus65/939a147634942dd885c8704334627f93
    mode: restart
    max_exceeded: silent
    trigger:
  4. @seamus65 seamus65 created this gist Jan 20, 2022.
    528 changes: 528 additions & 0 deletions zha_moes_smart_knob_lights.yaml
    Original 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