Hello
… happy new year to all …
i have a simple test : comparison between 2 times. it doest not work in automation:
the results are different when i check it in developper tool:
manuel ecoule:
{{now()|as_timestamp >=states('input_text.fp_m_offset_duree_var')|as_timestamp}}
returns:
manuel ecoule:
True
its ok
but same test in template in automation returns “dont pass” …it is not ok !
the code of the automation (testing purpose):
alias: fp_m_time_raz_wui
description: ""
trigger:
- platform: time_pattern
minutes: /1
- platform: state
entity_id:
- input_select.fp_m_duree
condition: []
action:
- if:
- condition: template
value_template: >-
now()|as_timestamp
>=states('input_text.fp_m_offset_duree_var')|as_timestamp
then:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.pf_m_g
else:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.pf_m_g
mode: single
what i am doing wrong ?