FIX template change for datetime
This commit is contained in:
@@ -7,6 +7,11 @@ binary_sensor:
|
|||||||
- binary_sensor.puerta_tendedero_primario
|
- binary_sensor.puerta_tendedero_primario
|
||||||
- binary_sensor.puerta_tendedero_secundario
|
- binary_sensor.puerta_tendedero_secundario
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ is_state('binary_sensor.puerta_tendedero_primario','on') or is_state('binary_sensor.puerta_tendedero_secundario','on') }}
|
{% if as_timestamp(states.binary_sensor.puerta_tendedero_secundario.last_changed) <=
|
||||||
|
as_timestamp(states.binary_sensor.puerta_tendedero_primario.last_changed) -%}
|
||||||
|
{{ states('binary_sensor.puerta_tendedero_primario') }}
|
||||||
|
{%- else -%}
|
||||||
|
{{ states('binary_sensor.puerta_tendedero_secundario') }}
|
||||||
|
{%- endif -%}
|
||||||
device_class: door
|
device_class: door
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user