Usability: loop back to min temp if difference between current and max temp is less than step value
This commit is contained in:
@@ -406,7 +406,7 @@ actions:
|
||||
then:
|
||||
- action: light.turn_on
|
||||
data:
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
transition: !input helper_temperature_transition_time
|
||||
target:
|
||||
entity_id: !input light
|
||||
@@ -449,7 +449,7 @@ actions:
|
||||
then:
|
||||
- action: light.turn_on
|
||||
data:
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
transition: !input helper_temperature_transition_time
|
||||
target:
|
||||
entity_id: !input light
|
||||
@@ -476,7 +476,7 @@ actions:
|
||||
then:
|
||||
- action: light.turn_on
|
||||
data:
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
transition: !input helper_temperature_transition_time
|
||||
target:
|
||||
entity_id: !input light
|
||||
@@ -503,7 +503,7 @@ actions:
|
||||
then:
|
||||
- action: light.turn_on
|
||||
data:
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
transition: !input helper_temperature_transition_time
|
||||
target:
|
||||
entity_id: !input light
|
||||
|
||||
@@ -303,7 +303,7 @@ actions:
|
||||
then:
|
||||
- action: light.turn_on
|
||||
data:
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
color_temp_kelvin: "{% if state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step >= helper_max_temperature %}{{ helper_min_temperature }}{% else %}{{ state_attr(light, 'color_temp_kelvin')|int + helper_temperature_change_step }}{% endif %}"
|
||||
transition: !input helper_temperature_transition_time
|
||||
target:
|
||||
entity_id: !input light
|
||||
|
||||
Reference in New Issue
Block a user