rock
September 2, 2019, 3:37pm
1
Is it possible to use a data template in a condition when working with automations?
I tried various versions in the like of below without success
- condition: time
data_template:
after: '{{ states('input_datetime.vardagsrum_morgon_time_off') }}'
I know I can do it with a template as condition but I think the readability and ease of maintinance is better if I can use time as condition
petro
(Petro)
September 2, 2019, 5:52pm
2
nope, only in a template condition.
should be easy though:
{{ as_timestamp(now()) >= state_attr('input_datetime.vardagsrum_morgon_time_off','timestamp') }}
rock
September 3, 2019, 6:23am
3
ok, that was what I was afraid of.
Already using a template condition but think its hard to get a quick understanding when going back for maintenance when you have loads of automations with “condition: template”