I have a 3 gang RF light switch controlled in home assistant through broadlink. I can toggle each light on and off which I have set up OK, but I also have a 4th RF command that switches all 3 lights off at once. I have a script which sends the broadlink packet command to turn them all off but I am not sure how to update the status of the lights in home assistant when the script is run.
I think I need to do something with input booleans but I find the whole subject a bit confusing. I have tried reading the component section (I am a bit of a noob) but still not really sure, so hoping someone here can help point me in the right direction.
You may want to use a switch template instead. Then it would work like a switch and you wouldn’t have to deal with crazy logic because it behaves like a switch. Input boolean is a strict on/off and you can’t turn it off if its already off. Which may not make sense to you now, but if you got into the input_boolean setup, you would run into situations where that is needed.
Ok so i think I understand it. Is it kind of like a virtual switch? The value template would be if the state of the lamps is on. Then can set my scripts as the on and offs?
yes. The beauty of it is that you can turn it on when its already on. Which may not seem like much, but an input_boolean ignores events if the state matches the event.
good example would be a on/off for a group. If 1 device is on in a group of 4 devices, the group will have an on status. If you want to turn the remainder of the devices on, you’d want to turn the group on, not each one individually.
So you’re suggestion didn’t quite work for my first plan I think for a few different reasons, but I just tried it for something else (turning my hifi on and off using scripts for on and off sequences) and it works brilliantly. Also works better with Alexa too.