I’m trying to set a sort of “timeout” for an old HiFi, connected via bluetooth with Alexa. I’d like to switch it off in case Alexa is not playing music for a while. I’m using this automation:
Ciao Polvere,
if you check the template you are using in developer tools - templates, it return you the right number?
Also, do you try it without the comma before the { ?
Instead of this:
minutes: ‘{{states(‘input_number.stereo_spegnimento_se_echo_in_pausa’) | int}}’
This:
minutes: {{states(‘input_number.stereo_spegnimento_se_echo_in_pausa’) | int}}
I tried, it doesn’t work either.
I had a look and it seems HA doesn’t access templates inside “for”. But then, I can’t figure out how to get a value from UI in these cases…