#Combining Light Switch on with RGB Light Group On in one button in a card

1 messages · Page 1 of 1 (latest)

stone igloo
#

Hi, I have an IKEA light bar with 4 RGB Zigbee lights that I have created a group for. But I cant turn on the Group without first turning on the switch that turns on the light bar. So I need to be able to combine the actions of turn light switch on and turn IKEA Light Bar on, in order to get a card that turns on my IKEA Light bar with options to change colour and brightness. Tried a few scripts but not working and not sure how to do it via the UI. Any suggestions?

violet crater
#

Create an automation with a trigger that fires when the switch turns on.

queen basin
#

Can you leave the light bar powered on all the time? That would probably be more optimal than having to first to on the bar then the lights. But, a bigger concern for me, is because the lights weren't powered, now you have to wait for them to connect before they can be turned on (provided they don't turn on automatically).

#

Assuming the lights can turn on automatically (or used in conjunction with an automation like @violet crater suggested), you could just set the tap_action to toggle the switch but the card's entity could be set as the light group. ```yaml
type: button
entity: light.living_room_lights
tap_action:
action: call-service
service: switch.toggle
data:
entity_id: switch.tester

#

But, now that I re-read your question, I'm not totally sure how to interpret the first sentence. Are the Zigbee bulbs plugged into the IKEA light bar? Or, do you have the lights bulbs and THEN the light bar as a completely separate thing?
If the later is the case, then I'm assuming your issue is more the fact that you have four light entities and one switch entity and they don't play nicely with each other's turn_on service.
The easy fix would be to change the entity type of the switch to a light. Go into the entity's settings, change the Show As drop-down and select Light, click Update. HA will hide the switch entity but will create a light entity for you that will now play nicely with the group.

stone igloo
# queen basin But, now that I re-read your question, I'm not totally sure how to interpret the...

Thanks for following up on this. Fistly, the reason I wanted to have the power to the swtich thatturns teh light bar (a group of 4 lights) on or off is that I wanted to save some power by not having the light switch on all the time. The light bar is actually a down-light set of 4 light sockets on swivels. Each light has a separate zigbee (IKEA style) RGB GU10 LED. I have grouped these so they work as one with the colour and brightness. I'll try again to change the switch to a light. When I turn the 'light' on it will turn all the zigbee LEDs on, but it wont know that it is a group that controls colour and brightness. Only the Group control does that. I can also turn the group on and off. Lets see if I set two actions 1 - the switch which I change to a 'light', and the the second action, turn the Group on where I can change the colour/brightness (within a card). I'll get back to you. ... thanks.

stone igloo
queen basin
#

Setting the switch entity to a light is not going to fix the problem. The amount of electricity you're going to save is probably negligible. The easiest fix is to just leave the light bar turned on. (Smart bulbs don't like being turned off.)
A second option is going to be the automation, but you still need to give the bulbs time to connect. Adding a delay in the action between turning on the switch and turning on the lights and setting it to probably 15-30 seconds should work. (You could get more complex by making the automation wait until the state of each light has changed from unavailable to off.) But the automation will also need to account for the light bar being on or off. If the bar is on, it needs to be turned off. If it is off, it needs to be turned on, wait for the delay, then turn on the lights.
Again, the easiest (and probably best) fix is to just leave the light bar on.

violet crater
#

Are these zigbee bulbs? You can maybe use state change to Available as the trigger.

stone igloo