Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. lights_update_colour:
  2. alias: Light Colour - Update
  3. sequence:
  4. - delay: 00:00:01
  5. - service: light.turn_on
  6. data_template:
  7. entity_id: >-
  8. {%- for state, all_on_lights in states.light | groupby("state") -%}
  9. {%- if state == "on" -%}
  10. {%- for light in all_on_lights | rejectattr("attributes.is_hue_group") -%}
  11. {%- if not(loop.first) -%}, {% endif %}
  12. {{- light.entity_id -}}
  13. {%- endfor -%}
  14. {%- endif -%}
  15. {%- endfor %}
  16. brightness: '{{ states.input_slider.brightness.state | int }}'
  17. rgb_color: ['{{ states.input_slider.red.state | int }}', '{{ states.input_slider.green.state | int }}', '{{ states.input_slider.blue.state | int }}']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement