For some reason, when I add that code in the file, my home assistant interface crash and I don’t have a way to make it start. Just removing that lines make the web ui come back again, why?
the purpose of the script is having a button on the interface that when it’s gonna be on its gonna execute that command, and if I switch off the other… seems pretty easy but I can’t get what Im doing wrong here…
After making changes to your config you should run the Check Config operation (available on the General Configuration page.) That will help prevent configuration errors from keeping HA from restarting successfully.
Basically you have an indentation typo. Also there needs to be a space between switch and 2. It should be: