Forked from PaulAntonDeen/zha_ecodim_remote_4_channel.yaml
Last active
August 31, 2023 20:11
-
-
Save jerbob92/a4f5962b23e9119557ccddbf02575f2d to your computer and use it in GitHub Desktop.
This file contains 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: | |
name: ZHA - Ecodim, 4 Channel remote v2 | |
description: Control any light using the Ecodim remote on ZHA | |
domain: automation | |
input: | |
remote: | |
name: Remote controller | |
description: Remote to use | |
selector: | |
device: | |
integration: zha | |
manufacturer: EcoDim | |
model: ED-10014 | |
multiple: false | |
light_1: | |
name: Light row 1 | |
description: The lights that will be controlled with row 1 | |
selector: | |
target: | |
entity: | |
domain: light | |
light_2: | |
name: Light row 2 | |
description: The lights that will be controlled with row 2 | |
selector: | |
target: | |
entity: | |
domain: light | |
light_3: | |
name: Light row 3 | |
description: The lights that will be controlled with row 3 | |
selector: | |
target: | |
entity: | |
domain: light | |
light_4: | |
name: Light row 4 | |
description: The lights that will be controlled with row 4 | |
selector: | |
target: | |
entity: | |
domain: light | |
step_size: | |
name: Step Size | |
description: The % step each dimming step takes | |
default: 10 | |
selector: | |
number: | |
min: 5.0 | |
max: 25.0 | |
unit_of_measurement: '%' | |
step: 1.0 | |
mode: slider | |
step_delay: | |
name: Step Delay | |
description: The time between dimming steps (ms) | |
default: 1000 | |
selector: | |
number: | |
min: 100.0 | |
max: 2000.0 | |
unit_of_measurement: milliseconds | |
step: 1.0 | |
mode: slider | |
source_url: https://gist.github.com/jerbob92/a4f5962b23e9119557ccddbf02575f2d | |
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 }}' | |
step_size: !input step_size | |
- choose: | |
- conditions: | |
- '{{ command == ''on'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 1 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_1 | |
- conditions: | |
- '{{ command == ''off'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 1 }}' | |
sequence: | |
- service: light.turn_off | |
target: !input light_1 | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 1 }}' | |
- '{{ args == ''[<MoveMode.Up: 0>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_1 | |
data: | |
brightness_step_pct: !input step_size | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 1 }}' | |
- '{{ args == ''[<MoveMode.Down: 1>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_1 | |
data: | |
brightness_step_pct: '{{ step_size * -1 }}' | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''stop'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 1 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_1 | |
- conditions: | |
- '{{ command == ''on'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 2 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_2 | |
- conditions: | |
- '{{ command == ''off'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 2 }}' | |
sequence: | |
- service: light.turn_off | |
target: !input light_2 | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 2 }}' | |
- '{{ args == ''[<MoveMode.Up: 0>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_2 | |
data: | |
brightness_step_pct: !input step_size | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 2 }}' | |
- '{{ args == ''[<MoveMode.Down: 1>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_2 | |
data: | |
brightness_step_pct: '{{ step_size * -1 }}' | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''stop'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 2 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_2 | |
- conditions: | |
- '{{ command == ''on'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 3 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_3 | |
- conditions: | |
- '{{ command == ''off'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 3 }}' | |
sequence: | |
- service: light.turn_off | |
target: !input light_3 | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 3 }}' | |
- '{{ args == ''[<MoveMode.Up: 0>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_3 | |
data: | |
brightness_step_pct: !input step_size | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 3 }}' | |
- '{{ args == ''[<MoveMode.Down: 1>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_3 | |
data: | |
brightness_step_pct: '{{ step_size * -1 }}' | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''stop'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 3 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_3 | |
- conditions: | |
- '{{ command == ''on'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 4 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_4 | |
- conditions: | |
- '{{ command == ''off'' }}' | |
- '{{ cluster_id == 6 }}' | |
- '{{ endpoint_id == 4 }}' | |
sequence: | |
- service: light.turn_off | |
target: !input light_4 | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 4 }}' | |
- '{{ args == ''[<MoveMode.Up: 0>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_4 | |
data: | |
brightness_step_pct: !input step_size | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''move_with_on_off'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 4 }}' | |
- '{{ args == ''[<MoveMode.Down: 1>, 50]'' }}' | |
sequence: | |
repeat: | |
while: | |
- condition: template | |
value_template: '{{ repeat.index < (100 / step_size)|int }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_4 | |
data: | |
brightness_step_pct: '{{ step_size * -1 }}' | |
- delay: | |
milliseconds: !input step_delay | |
- conditions: | |
- '{{ command == ''stop'' }}' | |
- '{{ cluster_id == 8 }}' | |
- '{{ endpoint_id == 4 }}' | |
sequence: | |
- service: light.turn_on | |
target: !input light_4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment