try to fix reset of temp
This commit is contained in:
@@ -303,13 +303,17 @@ variables:
|
|||||||
(override_reset_duration.minutes | default(0) | int) * 60 +
|
(override_reset_duration.minutes | default(0) | int) * 60 +
|
||||||
(override_reset_duration.seconds | default(0) | int) if override_reset_duration is mapping else 0 }}
|
(override_reset_duration.seconds | default(0) | int) if override_reset_duration is mapping else 0 }}
|
||||||
override_last_change: >
|
override_last_change: >
|
||||||
{{ as_datetime(states[setpoint_change_source_entity].last_updated) if setpoint_change_source_entity and
|
{{ states[setpoint_change_source_entity].last_updated if setpoint_change_source_entity and
|
||||||
states(setpoint_change_source_entity) not in ['unknown', 'unavailable', none] else none }}
|
states(setpoint_change_source_entity) not in ['unknown', 'unavailable', none] else none }}
|
||||||
override_duration_exceeded: >
|
override_duration_exceeded: >
|
||||||
{% set last_change = override_last_change %}
|
{% if override_last_change != none and override_reset_duration_seconds > 0 and setpoint_change_source_entity and states(setpoint_change_source_entity) == 'manual' %}
|
||||||
{% if last_change != none and last_change is not string and override_reset_duration_seconds > 0 and setpoint_change_source_entity and states(setpoint_change_source_entity) == 'manual' %}
|
{% set last_change = as_datetime(override_last_change) %}
|
||||||
{% set elapsed = (now() - last_change).total_seconds() %}
|
{% if last_change != none %}
|
||||||
{{ elapsed > override_reset_duration_seconds }}
|
{% set elapsed = (now() - last_change).total_seconds() %}
|
||||||
|
{{ elapsed > override_reset_duration_seconds }}
|
||||||
|
{% else %}
|
||||||
|
false
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
false
|
false
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user