mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Update to auto turn off the cycle (#3391)
* Update to auto turn off the cycle Addition of service_template to automatically turn off the cycle when the lights reach their minimum or maximum brightness. Validated on my own lights. * Fixed facepalm Added the raw/endraw tags to the half I missed
This commit is contained in:
parent
8c6bd973ff
commit
2ca3852dd7
@ -123,7 +123,12 @@ script:
|
||||
{% endif %}
|
||||
{{ next }}{% endraw %}
|
||||
|
||||
- service: script.turn_on
|
||||
- service_template: >
|
||||
{% raw %}{% if states.light.YOUR_LIGHT.attributes.brightness|default(0)|int < states('input_slider.light_maximum')|int %}
|
||||
script.turn_on
|
||||
{% else %}
|
||||
script.turn_off
|
||||
{% endif %}{% endraw %}
|
||||
data:
|
||||
entity_id: script.light_bright_pause
|
||||
|
||||
@ -149,7 +154,12 @@ script:
|
||||
{% endif %}
|
||||
{{ next }}{% endraw %}
|
||||
|
||||
- service: script.turn_on
|
||||
- service_template: >
|
||||
{% raw %}{% if states.light.YOUR_LIGHT.attributes.brightness|default(0)|int > states('input_slider.light_minimum')|int %}
|
||||
script.turn_on
|
||||
{% else %}
|
||||
script.turn_off
|
||||
{% endif %}{% endraw %}
|
||||
data:
|
||||
entity_id: script.light_dim_pause
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user