Last active
February 11, 2025 23:28
Revisions
-
Zuulcode revised this gist
Mar 14, 2023 . 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 @@ -1,4 +1,4 @@ #Zuulcode(2023), all rights reserved. blueprint: name: Styrbar multiple lights description: A blueprint that allows Ikea styrbar light controller to be used to -
Zuulcode revised this gist
Mar 14, 2023 . 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 @@ -1,4 +1,4 @@ #Zuulcode(2023), all right reserved. blueprint: name: Styrbar multiple lights description: A blueprint that allows Ikea styrbar light controller to be used to -
Zuulcode revised this gist
Mar 14, 2023 . 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 @@ -1,3 +1,4 @@ #Zuulcode(2023),all right reserved. blueprint: name: Styrbar multiple lights description: A blueprint that allows Ikea styrbar light controller to be used to -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 115 additions and 126 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 @@ -1,155 +1,144 @@ blueprint: name: Styrbar multiple lights description: A blueprint that allows Ikea styrbar light controller to be used to control multiple lights, made by Zuul. domain: automation input: controller: name: Controller description: The styrbar controller to be used to control the lights. selector: entity: domain: sensor multiple: false light_number: name: Light number description: An input_number helper with minimum value 1 and maximum value of at least the amount of lights used. This input should be configured to use increments of 1. selector: entity: domain: input_number multiple: false lights: name: Light(s) description: The lights that will be controlled by the controller. selector: entity: domain: light multiple: true source_url: https://gist.github.com/Zuulcode/6149d9c61c8679d963aeecde02055269 variables: light_number: !input light_number lights: !input lights mode: restart trigger: - platform: state entity_id: - !input controller to: 'on' id: 'on' - platform: state entity_id: - !input controller to: 'off' id: 'off' - platform: state entity_id: - !input controller to: arrow_left_click id: arrow_left_click - platform: state entity_id: - !input controller to: arrow_right_click id: arrow_right_click - platform: state entity_id: - !input controller to: brightness_move_up id: brightness_move_up - platform: state entity_id: - !input controller to: brightness_move_down id: brightness_move_down - platform: state entity_id: - !input controller to: brightness_stop id: brightness_stop action: - choose: - conditions: - condition: trigger id: 'on' sequence: - service: light.turn_on target: entity_id: '{{ lights[int(states(light_number)) - 1] }}' - conditions: - condition: trigger id: 'off' sequence: - service: light.turn_off target: entity_id: '{{ lights[int(states(light_number)) - 1] }}' - conditions: - condition: trigger id: arrow_left_click sequence: - service: input_number.set_value data: value: '{% if int(states(light_number)) > 1 %} {{ int(states(light_number)) - 1 }} {% else %} {{ lights|length }} {% endif %}' target: entity_id: !input light_number - conditions: - condition: trigger id: arrow_right_click sequence: - service: input_number.set_value data: value: '{% if int(states(light_number)) < lights|length %} {{ int(states(light_number)) + 1 }} {% else %} 1 {% endif %}' target: entity_id: !input light_number - conditions: - condition: trigger id: brightness_move_up sequence: - repeat: until: - condition: trigger id: brightness_stop sequence: - service: light.turn_on target: entity_id: '{{ lights[int(states(light_number)) - 1] }}' data: brightness_step_pct: 10 - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500 - conditions: - condition: trigger id: brightness_move_down sequence: - repeat: until: - condition: trigger id: brightness_stop sequence: - service: light.turn_on target: entity_id: '{{ lights[int(states(light_number)) - 1] }}' data: brightness_step_pct: -10 - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500 -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 0 additions and 11 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 @@ -17,15 +17,6 @@ blueprint: entity: domain: input_number lights: name: Light(s) description: The lights that will be controlled by the controller. @@ -85,8 +76,6 @@ action: - service: light.turn_on target: entity_id: "{{ lights[int(states(light_number)) - 1] }}" - conditions: - condition: trigger id: "off" -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 4 additions and 5 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 @@ -101,8 +101,8 @@ action: - service: input_number.set_value data: value: >- {% if int(states(light_number)) > 1 %} {{ int(states(light_number)) - 1 }} {% else %} {{ lights|length }} {% endif %} @@ -116,9 +116,8 @@ action: data: value: >- {% if int(states(light_number)) < lights|length %} {{ int(states(light_number)) + 1 }} {% else %} 1 {% endif %} target: entity_id: !input light_number -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 2 additions and 2 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 @@ -101,7 +101,7 @@ action: - service: input_number.set_value data: value: >- {% if int(states(light_number)) < lights|length %} {{ int(states(light_number)) + 1 }} {% else %} {{ lights|length }} @@ -115,7 +115,7 @@ action: - service: input_number.set_value data: value: >- {% if int(states(light_number)) < lights|length %} {{ int(states(light_number)) - 1 }} {% else %} {{ lights|length - 1 }} -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 3 additions and 2 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 @@ -103,7 +103,8 @@ action: value: >- {% if int(states(light_number)) < lights|length %} 1 {{ int(states(light_number)) + 1 }} {% else %} {{ lights|length }} {% endif %} target: entity_id: !input light_number @@ -117,7 +118,7 @@ action: {% if int(states(light_number)) < lights|length %} 1 {{ int(states(light_number)) - 1 }} {% else %} {{ lights|length - 1 }} {% endif %} target: entity_id: !input light_number -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 4 additions and 4 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 @@ -101,8 +101,8 @@ action: - service: input_number.set_value data: value: >- {% if int(states(light_number)) < lights|length %} 1 {{ int(states(light_number)) + 1 }} {% else %} 1 {% endif %} target: @@ -114,8 +114,8 @@ action: - service: input_number.set_value data: value: >- {% if int(states(light_number)) < lights|length %} 1 {{ int(states(light_number)) - 1 }} {% else %} {{ len(lights) - 1 }} {% endif %} -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 2 additions and 2 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 @@ -101,7 +101,7 @@ action: - service: input_number.set_value data: value: >- {% if states(light_number) < lights|length %} 1 {{ states(light_number) + 1 }} {% else %} 1 {% endif %} @@ -114,7 +114,7 @@ action: - service: input_number.set_value data: value: >- {% if states(light_number) < lights|length %} 1 {{ states(light_number) - 1 }} {% else %} {{ len(lights) - 1 }} -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 5 additions and 3 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 @@ -11,7 +11,7 @@ blueprint: domain: sensor light_number: name: Light number description: An input_number helper with minimum value 1 and maximum value of at least the amount of lights used. This input should be configured to use increments of 1. selector: entity: @@ -132,7 +132,8 @@ action: id: brightness_stop sequence: - service: light.turn_on target: entity_id: "{{ lights[int(states(light_number)) - 1] }}" data: brightness_step_pct: 10 - delay: @@ -151,7 +152,8 @@ action: id: "brightness_stop" sequence: - service: light.turn_on target: entity_id: "{{ lights[int(states(light_number)) - 1] }}" data: brightness_step_pct: -10 - delay: -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 85 additions and 4 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 @@ -77,7 +77,88 @@ trigger: id: "brightness_stop" action: - choose: - conditions: - condition: trigger id: "on" sequence: - service: light.turn_on target: entity_id: "{{ lights[int(states(light_number)) - 1] }}" data: brightness_pct: !input light_brightness - conditions: - condition: trigger id: "off" sequence: - service: light.turn_off target: entity_id: "{{ lights[int(states(light_number)) - 1] }}" - conditions: - condition: trigger id: "arrow_left_click" sequence: - service: input_number.set_value data: value: >- {% if states(light_number) < len(lights) %} 1 {{ states(light_number) + 1 }} {% else %} 1 {% endif %} target: entity_id: !input light_number - conditions: - condition: trigger id: "arrow_right_click" sequence: - service: input_number.set_value data: value: >- {% if states(light_number) < len(lights) %} 1 {{ states(light_number) - 1 }} {% else %} {{ len(lights) - 1 }} {% endif %} target: entity_id: !input light_number - conditions: - condition: trigger id: "brightness_move_up" sequence: - repeat: until: - condition: trigger id: brightness_stop sequence: - service: light.turn_on entity_id: "{{ lights[int(states(light_number)) - 1] }}" data: brightness_step_pct: 10 - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500 - conditions: - condition: trigger id: "brightness_move_down" sequence: - repeat: until: - condition: trigger id: "brightness_stop" sequence: - service: light.turn_on entity_id: "{{ lights[int(states(light_number)) - 1] }}" data: brightness_step_pct: -10 - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500
-
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 4 additions and 85 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 @@ -77,88 +77,7 @@ trigger: id: "brightness_stop" action: - device_id: 592dc7173bd1a228aaab20dd3d61164c domain: mobile_app type: notify message: "{{ lights[int(states(light_number) - 1)] }}" -
Zuulcode revised this gist
Mar 13, 2023 . No changes.There are no files selected for viewing
-
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 4 additions and 4 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 @@ -84,7 +84,7 @@ action: sequence: - service: light.turn_on target: entity_id: "{{ lights[int(states(light_number) - 1)] }}" data: brightness_pct: !input light_brightness - conditions: @@ -93,7 +93,7 @@ action: sequence: - service: light.turn_off target: entity_id: "{{ lights[int(states(light_number) - 1)] }}" - conditions: - condition: trigger id: "arrow_left_click" @@ -132,7 +132,7 @@ action: id: brightness_stop sequence: - service: light.turn_on entity_id: "{{ lights[int(states(light_number) - 1)] }}" data: brightness_step_pct: 10 - delay: @@ -151,7 +151,7 @@ action: id: "brightness_stop" sequence: - service: light.turn_on entity_id: "{{ lights[int(states(light_number) - 1)] }}" data: brightness_step_pct: -10 - delay: -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 21 additions and 21 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 @@ -43,44 +43,44 @@ trigger: - platform: state entity_id: - !input controller to: "on" id: "on" - platform: state entity_id: - !input controller to: "off" id: "off" - platform: state entity_id: - !input controller to: "arrow_left_click" id: "arrow_left_click" - platform: state entity_id: - !input controller to: "arrow_right_click" id: "arrow_right_click" - platform: state entity_id: - !input controller to: "brightness_move_up" id: "brightness_move_up" - platform: state entity_id: - !input controller to: "brightness_move_down" id: "brightness_move_down" - platform: state entity_id: - !input controller to: "brightness_stop" id: "brightness_stop" action: - choose: - conditions: - condition: trigger id: "on" sequence: - service: light.turn_on target: @@ -89,14 +89,14 @@ action: brightness_pct: !input light_brightness - conditions: - condition: trigger id: "off" sequence: - service: light.turn_off target: entity_id: "{{ lights[states(light_number) - 1] }}" - conditions: - condition: trigger id: "arrow_left_click" sequence: - service: input_number.set_value data: @@ -109,7 +109,7 @@ action: entity_id: !input light_number - conditions: - condition: trigger id: "arrow_right_click" sequence: - service: input_number.set_value data: @@ -124,7 +124,7 @@ action: - conditions: - condition: trigger id: "brightness_move_up" sequence: - repeat: until: @@ -143,12 +143,12 @@ action: - conditions: - condition: trigger id: "brightness_move_down" sequence: - repeat: until: - condition: trigger id: "brightness_stop" sequence: - service: light.turn_on entity_id: "{{ lights[states(light_number) - 1] }}" -
Zuulcode revised this gist
Mar 13, 2023 . 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 @@ -1,5 +1,5 @@ blueprint: name: Styrbar multiple lights description: A blueprint that allows Ikea styrbar light controller to be used to controll multiple lights made by Zuul. domain: automation input: -
Zuulcode revised this gist
Mar 13, 2023 . 1 changed file with 7 additions and 5 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 @@ -82,16 +82,18 @@ action: - condition: trigger id: on sequence: - service: light.turn_on target: entity_id: "{{ lights[states(light_number) - 1] }}" data: brightness_pct: !input light_brightness - conditions: - condition: trigger id: off sequence: - service: light.turn_off target: entity_id: "{{ lights[states(light_number) - 1] }}" - conditions: - condition: trigger id: arrow_left_click -
Zuulcode revised this gist
Mar 13, 2023 . 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 @@ -24,7 +24,7 @@ blueprint: number: min: 0 max: 100 unit_of_measurement: "%" lights: name: Light(s) -
Zuulcode created this gist
Mar 13, 2023 .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,162 @@ blueprint: name: Styrbar zones description: A blueprint that allows Ikea styrbar light controller to be used to controll multiple lights made by Zuul. domain: automation input: controller: name: Controller description: The styrbar controller to be used to controll the lights. selector: entity: domain: sensor light_number: name: Zone number description: An input_number helper with minimum value 1 and maximum value of at least the amount of lights used. This input should be configured to use increments of 1. selector: entity: domain: input_number light_brightness: name: Light brightness description: The brightness the lights will be when turned on by the controller. selector: number: min: 0 max: 100 unit_of_measurement: % lights: name: Light(s) description: The lights that will be controlled by the controller. selector: entity: domain: light multiple: true variables: light_number: !input light_number lights: !input lights mode: restart trigger: - platform: state entity_id: - !input controller to: on id: on - platform: state entity_id: - !input controller to: off id: off - platform: state entity_id: - !input controller to: arrow_left_click id: arrow_left_click - platform: state entity_id: - !input controller to: arrow_right_click id: arrow_right_click - platform: state entity_id: - !input controller to: brightness_move_up id: brightness_move_up - platform: state entity_id: - !input controller to: brightness_move_down id: brightness_move_down - platform: state entity_id: - !input controller to: brightness_stop id: brightness_stop action: - choose: - conditions: - condition: trigger id: on sequence: .- service: light.turn_on entity_id: "{{ lights[states(light_number) - 1] }}" data: brightness_pct: !input light_brightness - conditions: - condition: trigger id: off sequence: - service: light.turn_off entity_id: "{{ lights[states(light_number) - 1] }}" - conditions: - condition: trigger id: arrow_left_click sequence: - service: input_number.set_value data: value: >- {% if states(light_number) < len(lights) %} 1 {{ states(light_number) + 1 }} {% else %} 1 {% endif %} target: entity_id: !input light_number - conditions: - condition: trigger id: arrow_right_click sequence: - service: input_number.set_value data: value: >- {% if states(light_number) < len(lights) %} 1 {{ states(light_number) - 1 }} {% else %} {{ len(lights) - 1 }} {% endif %} target: entity_id: !input light_number - conditions: - condition: trigger id: brightness_move_up sequence: - repeat: until: - condition: trigger id: brightness_stop sequence: - service: light.turn_on entity_id: "{{ lights[states(light_number) - 1] }}" data: brightness_step_pct: 10 - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500 - conditions: - condition: trigger id: brightness_move_down sequence: - repeat: until: - condition: trigger id: brightness_stop sequence: - service: light.turn_on entity_id: "{{ lights[states(light_number) - 1] }}" data: brightness_step_pct: -10 - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500