Hello all, I would like to use the current mode name when sending a message i.e. "The current mode is now set to "ArmAll". Can someone please point me in the right direction. Thanks!
Couple of questions.
It sounds like you’re referring to Hubitat safety monitor mode, i.e. armed/disarmed status. Not the hub’s mode, e.g. day, night, away etc.
Is that correct?
Additionally, what do you envision as the trigger for these messages? Is it when HSM arms/disarms? Or are you trying to pull the current HSM armed state into a message that gets sent by some other trigger/conditions?
Thanks for the reply. Yes; I am referring to the Modes I have configured that appear under: http://IPADDRESS/modes/edit
When I set a change a mode i.e. Mode-Home, Mode-Armed, Mode-Disarmed I would like to use the current state in a message. If not possible, I could create a simple if/else/then rule, but I was looking for a variable that would allow me to create a simplified rule. Thanks!
OK I think I understand, you’re referring to hub modes that you happen to have named armed/disarmed etc. (not HSM arming states).
But I’m still not 100% clear I’m following what trigger and actions you want to take.
Does this mean that, for example, when the hub changes to mode-home, you want to receive a notification that says “hub mode changed to mode-home”?
ETA: And how are you currently changing modes? Manually with the mobile app/a dashboard? With other automations you’ve already configured?
one old stumble block was case sensitivity. I think %Mode% and %mode% used to give me pain. is that possible?
Is that one of the built in substitution variables?
%mode% is not a built-in event/substitution variable in RM.
Never has been, afaik.
That seems like exactly what the OP was trying to accomplish. Very elegant solution!
Mea Culpa. %Value% not %Mode% was a problem I inflicted on myself a few years ago. I'm getting old. Still, it was a case sensitivity issue I had - that I do recall with clarity!
Writing the status to a log did the trick. I was then able to use that variable string in my script. This is a more concise solution rather than writing a series of if/els/then statements. Thanks for taking time to help. Problem solved.


