Has anyone written a SmartApp that would do the same thing as the Mood Lighting app, but only changes the color of the bulbs, and does not adjust the power state? In other words I’d like to change the color or the light, not turn it on if it is currently off. The next time the light is turned on, I’d like it to be the new color. I haven’t seen anything that seems to be able to do this currently. I’d kind of like to do this generally for dimmer level and color temperature as well. It would make using lights as notifiers much more useful and improve the xAF greatly.
If I understand what you’re asking, it’s not technically possible using the zigbee specification. However, you could use a smart app like scene machine to store the settings that you would like set when the bulb comes on. I realize that probably sounds like the same thing, but there’s a technical distinction.
If you can check the Bulb’s state in your color setting SmartApp, prior to setting the color, you can issue an “
off()” Command immediately after color setting (if the bulb was previously off)… I did this for a brightness preset and the command usually goes through quickly enough that you won’t even see a flash… I hope.
So it looks like the device handlers always automatically turn on when the color is set? Seems to me that should be two separate commands. Anyone know why that decision was made? I guess I’m going to have to finally jump in and write a custom SmartApp to handle some of my desired uses.
You may be able to create a modified device type to do this, to add the extra command you want. I did that for Dimmer Switch, creating a modified one where you could change the dimmer level when it was off – setting the dimmer level turns on the light, so the device type turns it back off. The next time the light is turned on with the switch, it comes on to the set dimmer level. Similar problem, could have a similar solution.
I did this by modifying the stock Hue Connect smartapp and the Hue Device Types (just as Bruce suggested to you above). Here’s a link that might help you suss it all out.