I’m hoping for a home assistant solution to this as well, but if you don’t mind downloading yet another smart home app, you could try linking your cync app to the Google home app and set up routines in Google home to set the color only (without turning on the light). Then no matter how you turn it on after the routine has run the light will be the right color. At least that’s how it works with my tuya/smart life lights.
I usually use a battery powered zigbee switch with an automation that uses light.toggle or I ask the voice assistant to turn on the light, but regardless there is no transition.
I also use the adaptive lighting integration during the day, and that always has a very brief but noticable transition from the last color it was on to what adaptive lighting tells it to be after I turn the light on, but at night I turn off adaptive lighting and have Google home set the lights to orange at 8pm, regardless of whether or not the lights are on, and when I turn them on (by any method) after 8pm they are orange, there is no transition.
I can also just ask the assistant to turn an off light to like purple or something, and then turn on the light and it’s already purple, there is definitely no transition (unless adaptive lighting is on, then it quickly transitions from purple to an appropriate shade of white)
Which integration are you using for your Tuya lights?
Just the standard built in tuya integration…
What is the command you issue to Google Assistant to set the light’s color without turning it on? Is it simply “Set bedroom light to green”
Yep, “set bedroom light to green” or “turn the bedroom light green” or some variation of that, then the speaker will do the little ping that means the command was successful, the light has remained off that whole time, no flashing it anything, and then when I ask it to turn on the light or use the switch it comes on green.
I’ll include a screenshot of the routine too…
I had the Google home app night-time color change routines set up well before I set up home assistant though, that’s why I was so confused when I went to set up those automations in home assistant so I could delete the Google home app, the only info I can find says it’s a limitation of the bulbs that they can’t be changed while off, but I’ve been doing it with the Google home app this whole time…
The thing is I don’t know how Google Assistant is interacting with your lights via Tuya. In other words, what specific API calls is it making when it controls the light? Perhaps Tuya’s API offers the ability to control lighting parameters while the light isn’t illuminated. Would you happen to know?
Home Assistant’s implementation of Tuya’s API calls is what it is (i.e. it may or may not have implemented the entire API). I believe the closest you can get to “no visible color transition” is via the Tuya integration’s support for Scenes. Create a scene in the app, it’ll appear in Home Assistant, call the scene and whatever lighting parameters you set will be activated immediately.
No, I’m sorry, my technical knowledge of this stuff is pretty non-existent… all I know is the smart life app is just one of the like 1000 apps it allows you to link to in the Google home app…
The reason I have it set up in the Google home app is because I could never get color change automations to work in the smart life app, and looking at it now there’s no direct way to change the color without turning on the light in the smart life app, but you can make an automation in the smart life app to change the brightness of a light while it’s off and that works well.
You think a change in the ability of home assistant to make changes to these lights while off would have to come from the tuya integration though? I could try barking up that tree lol
Thank you for this solution! What a great idea
Also, you have the patience of a saint to deal with 123 . You’ve given something that is 99% identical to a user as the lifx.set_state functionality and all their responses are pedantic and dismissive.
In my case, it’s actually 100% identical from a user perspective as I don’t have any perceptible change when I turn on the lights
Hi,
my zigbee lights connected through zigbee2mqtt support changing color by sending a message to mqtt topic.
Unfortunately home assistant does not seem to be able to generate this message, however you can send it through mqtt push service directly. Here is my working example:
- service: mqtt.publish
data:
retain: false
qos: "1"
payload: "{\"color\":{\"x\":0.701,\"y\":0.299}}"
topic: zigbee2mqtt/Corridor bulb right/set
If you are using Tuya-Local (GitHub - make-all/tuya-local: Local support for Tuya devices in Home Assistant) you can change the scene and it does not turn on the device.
I use this based on time of day. If the light is on it changes to the new scene at that specified time. If the light is off at that time it will use the new scene as soon as it is turned on.
Works perfectly and you don’t get the slight delay in colour change that the “light.turn_on” trigger has. Added beneift of being able to use animated lighting effects. Down side is you have to use the Tuya app to configure the scenes.
It has allowed me to move my time of day colour routines from Google Home back to Assistant.
What do you mean with scene? The built-in scenes for the lamp of the tap to run automation scenes? The scenes also work with normal Tuya. But I want to configure everything within HA, HA has more options (like colors) and you can combine scenes with non-tuya stuff. Also I want to migrate to Zigbee through SkyConnect.
My solution is to use adaptive lightning to lower the color/brigtness over the day. And in the evening just run the scene when I need it. Blacky Sensor Light is also pretty good.
Still adjusting brightness without changing the light would be so much better. All these smart scripts, only works when the lamp is on. Always causing flashing or giving issues.
yeah sadly adaptive lighting doesnt support setting the color on lights that are off either. really wish HA would just support this natively without requiring a different service call.
RE-Reading the original question, I realize this doesn’t answer it. This only gets around the light flashing to it’s last color & brightness when switched on.
I get around this by having the automation that makes the button turn the light off set it to dim red first. Now it comes on dim red first, which doesn’t wake anyone up. The light on button automation sets it back to white.
I’m planning to enhance further to allow me to turn on and off the light with google, by doing this.
- Setup a dummy light as mentioned earlier with the colour, brightness and on/off info.
- Link all controls and automations to that dummy one.
- Add an automation that controls the real light when the dummy one is turned off but make it first set the colour to deep red and the brightness as low as possible, then turn off.
- Setup an automation to turn on and set the colour of the real one to match the dummy one if the dummy one is on, otherwise ignore colour changes.
It’s not perfect, but it works well enough for me.