Run a command and return HSM back to previous status

I have a friend who leaves her Motorcycle in my garage. I have made her a dashboard that has an icon that runs a rule that will turn off HSM and open the garage, she also has one to close the door. When she opens it, it will set the HSM to Away.

The problem is, if I am home, instead of turning it back to the home mode, or off, I have it set to setting it away.

I know it is possibly a variable or something, but I do not understand it well enough.

what I would like, is it to record the variable, and then after an hour or perhaps when she closes the garage, the HSM is set back to what it was when she opened the door.

in rule machine, I am just not understanding how this can be done.

Is this what you are describing?

If you are away, HSM is already set to Away, She turns off HSM, opens door, shuts door, HSM turns on.

If you are home, HSM is set to Home, She turns off HSM, opens door, shuts door, HSM turn on, but you want it to go to Home?

1 Like

What I want it to do , is go back to the state that HSM was set when she opened the door. like If I am home, it want it to return to home, if I am gone, I want it to return to away.

currently when I am home, and HSM is enabled in home mode, if a door opens I get an alert.

long story short, is whatever mode it was when she opened the door, I want it to return to that mode when she closes the door.

You can capture the current mode in a variable and use it in your rule. See this example by @bertabcd1234 on capturing the mode:

3 Likes