Hi everyone! I’m on HomeAssistant for a while but never tried more complex stuff.
Recently got a power problem that burnt my machine so I started a new installation from scratch.
Now trying to make an automation work using a template condition and happens that I can’t figure out what the problem is. If anyone could help me here I’d appreciate a lot.
So it is supposed to activate one of the scenes when triple click on a button in my house, depending on this boolean state. But instead it does nothing.
Thanks in advance!
When debugging an automation, the first step is to determine if the problem is due to a faulty trigger or action. Go to Configuration > Automations, find the automation Toggle Natal, and click EXECUTE. This will skip the automation’s trigger and simply execute the action. If either of the two scenes is turned on then you have confirmed the action works correctly and the problem may be due to an incorrect trigger. However, if neither scene is turned on, or the wrong scene, then you know the problem is in the action.
I’ve tried that and in the logbook I can see it was triggered but nothing happens. What I did so far was to split it into two different automations, but I’d like to make it only one so it looks better. It seems to be just a simple mistake. I’ve used a template just like that to send a notification on other automation and it worked. Now I’m thinking if it is possible to use a template to define an action entity_id or if it’s not allowed at all.
Paste this into Developer tools > Template Editor then change the state of input_boolean.natal from on to off to on. As you change its state, the Template Editor should report scene.natal_apagado then scene.natal_aceso.
scene.natal_{{'apagado' if is_state('input_boolean.natal', 'on') else 'aceso' }}
Yeah! It’s super weird. I mean. On the Templates section it works well. The trigger works. I’ve used templates to do other if else in other automations and they work well. This one is reeeeally weird.
But anyway, thanks a lot for you help with this