The backstory:
I’m a newbie… I’m a very recent Vera to ST convert and still in the learning curve stage on this side. Question is this… I have a simple Smart Lighting Automation that lights two Philips Hue Iris lights red when my rear slider door is opened. The Automation turns the lights Off when the door is closed. 99.9% of the time this works exactly as intended. However, I also use the same Hue Iris lights as decorative/ambient lighting in the home - particularly around holidays.
The question:
How do I program an automation that will turn my Hue Iris lights red when the rear slider is opened and then back to their previous state (currently pink in the evenings for Valentine’s Day) when the door is closed. Bear in mind, if it is Christmas time these lights might be red & green, or if no holiday they may just be off so “Returning to Previous State” is the prime directive.
Is this through a smartapp you coded, or an existing app?
If you coded it, you just need to store the existing state at the beginning of your “open” method and then in your “close” method set the color to that state
@bravenel, can this be possibly done in Rule Machine? I was intrigued by this when I was playing with Smart Home Monitor. I have a few Smartsense moisture sensors. I set the leak detector in SMH to turn ON all the Philips Hue Color and Bloom lights and set them to red. Works great when the sensor is triggered. I was surprised to see that all the lights returned to their previous states and colors when I cleared the notification in SMH. Now I want to use the Bloom to set the color based on different events, and then return them to their previous states after the event is cleared.
@bravenel, the hues are miserable when trying to capture their current state, if they were set from st, then all good, if they were set via another means st likely won’t have the actual state of the device…
If you desire to obtain an epic headache in state map manipulation, have a look at superState… yea, I would write it differently today…
What if the hues are totally controlled by ST?
I do have some hues that are controlled by the dimmer switch. But the Hue Bloom, which is what I am using for notification, is totally controlled by ST or Rule Machine.
So… back to the Original Post…
I was looking to do the same thing.
Have 1 light in each room turn red when the front door opens, return to previous state when closed.
Now that rule machine does not exist (because some whiny man-child took his toys and went home), how would i do this?..