I have been trying for some time now to get my lights to change colour temp at sunrise and sunset via automation. I would like this to house-wide so every bulb does it.
IKEA tradfri will not change colour unless the bulb is switched on. So my idea was to call a script from an automation that’s triggered at sunset and sunrise. Problem with that is if the bulb is already on it changes the brightness to whatever I set the script to, this I don’t want. So need to separate the on from the off and turn on and change the brightness of the bulb is off, change the colour and turn it back off again and have a separate scrip that handles the bulbs that are on as I want the brightness to remain the same and only change the colour and obviously stay on. I cant just turn all on and change the colour as it’s my understanding that they all go off or none go off after the colour change.
I thought I had it when I came across this:
found this
and using a light.group, the problem now is if one single light in the group is on it doesn’t work as the group is on. using the syntax in this link I have managed to get the result I was after but only for one bulb the second I try and make it for more it doesn’t like it and throws errors no matter what I do or change.
it’s driving me mad and ask for your help as a last resort. as can’t seem to sort it out for my self.
looking for a scrip that says if bulb in a group of even just multiple light entities is off, do this and if on do this.
I don’t mind having two scrips