#Can the seconds below be templated?

1 messages · Page 1 of 1 (latest)

true blade
#

I'm tryng touse following conditional code in a script and it doesn't seem to like the template. I've tried it with quotes and without. Any ideas?

conditions:
- condition: state
entity_id: fan.living_room_ceiling_fan
attribute: percentage
state: "33"
for:
seconds: {{ states('number.living_room_fireplace_fan_delay') | int }}

little swift
#

Yep it can - it shows it as an example on the conditions page

coral bear
#

Quotes are required there.

little swift
#

Needs quotes to work but does work

#

When you say it "doesn't work" is it throwing errors, or failing the condition? Those are very different

true blade
#

It's failing the condition but I'm not sure why

coral bear
#

Remove quotes around "33"

#

it's a string/number mismatch

true blade
#

Still doesn't pass

coral bear
#

Post the new yaml

true blade
#

condition: state
state: 33
entity_id: fan.living_room_ceiling_fan
attribute: speed

little swift
#

Your checking the speed attribute not the percentage? Or is that just a translation thing?

true blade
#

I removed the delay piece for now

coral bear
#

go back to percentage

true blade
#

There is no pecentage attribute

little swift
true blade
coral bear
#

just go to yaml mode

#
attribute: percentage
state: 33
little swift
coral bear
#

doh

#

yes

#

Ok Speed is the UI translation of percentage

true blade
#

attribute: percentage
state: 33

doesn't work.....with or without quotes

#

strange.....changed it and tested.....not working....wait 30 seconds and try again.....works