Hey guys,
I have set up a “Goodnight” scene, which does a bunch of stuff before i go to sleep.
One of this things is make sure my TV is off (through IR).
Unfortunately, as i turn on the TV with multiple ways, HA rarely knows the true state of it.
So sometimes, when i run the scene, the TV switch is already off (although the TV is on) and HA ignores the scene entry.
Is there some way to force send the OFF IR command every time the scene runs?
Perhaps create a template switch that will run the same script on on/off and have the scene toggle it every time? But that sounds dumb, any smarter way?
I should say that i have separate IR codes for on/off and that i also tried having HA run a script as part of a scene but it didnt work. I guess there’s the solution to turn the whole scene into a script but i’d like to avoid that.
Use a script instead of a scene. That way you can ensure you call the switch.turn_off service.
Scenes are just interpreted into scripts anyway. In a scene you specify a state and home assistant works out what service to call to get that state. If you do the interpreting there is less chance for ambiguous results, especially if your switches have no state feedback.