1) Give a description of the problem
I am trying to set a piston that would allow me to take different actions based on the occupancy in the house, unfortunately my logic is flawed and can’t get it to work when using “changed to” present correctly. I am currently using the built in routine from smartthings but it is too limited.
2) What is the expected behavior?
I have 2 people living in the house. About 30 minutes before sunset, if one of us comes home and no one else is home, I would like to turn a specific set of lights. But if someone is already home, I would like turn on a different set.
Example: I get home from work at 6:30PM, entrance, backyard and kitchen lights turn. I go about my evening and then go to bed. I turn off the entrance and kitchen lights. My wife comes back home from work after I went to bed, I only want the entrance light to turn on for her. It could be reversed and I get home from drinking beer after she got home already.
I can use iPhone presence sensors for that.
3) What is happening/not happening?
I am using the current presence state, so if someone is leaving, then it turns on the first set of lights again. I’d like to only take actions when status changes to present.
4) Post a Green Snapshot of the piston