I have 4 of the Hue white and color ambiance 4" retrofit’s group paired with 2 Blue Dimmers (VZM31-SN) for local control. They work quite well with the exception of when I set a color in HA and turn the light off by the switch or in HA, the next time the switch turns the lights on, it turns on to the last color. Any way to have the switch always turn on to a default 5000k color with the direct bindings?
I have the same Hue retrofits. In Z2M, each light has a “Color temp startup” property exposed. I have mine set to “previous”, but you’re able to pick a specific color temperature instead. I don’t have any experience with ZHA, but I assume there’s a similar property available.
Yeah I gave up on ZHA and am also running Z2M. I have that set to ‘Cool’ on all of the lights but they return to previous when controlled by the switch:
Hmm, I guess I never read it carefully before, but the setting is explicitly color temperature for “cold power on”, which I guess means when power is cut/restored, not when a Zigbee off/on message is sent. So my initial advice was totally irrelevant to your question.
At the device level, I don’t think the Inovelli switches can send the Hue bulbs any color messages through Zigbee binding. So you might need to update the color with a HA automation.
(If you decide to go down that route, check out this thread, where some of us figured out how to change Hue bulb color temperatures even when they’re off, to fix a jarring color change when Adaptive Lighting takes over a light’s color)
I am not following on where to look in that thread or other threads linked in that thread or the gethub links.
Do I need to run the adaptive lighting blueprint or is there a command I can run in an automation to set the color to 5k after it’s been to another color?
Or is it this:
I don’t think any of the automations in that thread will work for you exactly if you’re not using the Adaptive Lighting integration. But you can create an automation publishing a mqtt payload that includes the crucial "execute_if_off": "true"
.
So the trigger for the automation would be when your switch changes state from on to off, and the automation’s action would be MQTT.publish to the topic zigbee2mqtt/{YOUR LIGHT GROUP'S NAME}/set
and the payload
{
"color_options": {
"execute_if_off": "true"
},
"color_mode": "color_temp",
"color_temp": 200
}
where {YOUR LIGHT GROUP'S NAME}
is the friendly name of the group your switch is bound to.
(200 is in minireds, which is the equivalent of 5000K)
Does that make sense?
@jncasey that works great, thank you!
alias: Trigger - Hall Lights Back to White
description: ""
triggers:
- trigger: state
entity_id:
- light.hall_lights
from: "on"
to: "off"
id: Hall-Lights-On-To-Off
- trigger: state
entity_id:
- light.hall_s1
- light.hall_s2
from: "on"
to: "off"
id: Hall-S1-On-To-Off
- trigger: state
entity_id:
- light.hall_s2
from: "on"
to: "off"
id: Hall-S2-On-To-Off
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Hall-Lights-On-To-Off
- Hall-S1-On-To-Off
- Hall-S2-On-To-Off
sequence:
- action: mqtt.publish
data:
topic: zigbee2mqtt/Hall-Hue-Lights/set
payload: |-
{
"color_options": {
"execute_if_off": "true"
},
"color_mode": "color_temp",
"color_temp": 200
}
mode: single