Message Variables

Having a hard time trying to figure out the %device% and %value% variables in the alert section. I am tried this in 2.5 and now 3.0 with the same result. If I use either variable in the message, when the mode is set to away (triggered by door open, mode is away) the message is formatted like this intending to tell me which contact sensor is open:
%device% is open and no one is home!!!!
The result in pushover is: Home is open and no one is home!!!

Conditions:
[Garage Door Opener, Security - Kitchen Door, Security - Front Door, Security - Basement Window, Security - Back Door, Security - Back Window, Security - Window, Garage Door Tilt Sensor, Security - Kitchen Window, Security - Front Window 1, Security - Front Window 2] any open TRUE
Mode is Away FALSE
Can the %device% variable name the contact that is open?

Use a triggered rule instead using the variable "device" is the most recent event which in your case was the "mode" which is why it doesn't format correctly. This is probably a rule best left to the built-in app Hubitat Safety Monitor, but it has some feature you may not need and not quite as much flexibility as RM 3.

If you don't want the alert in a specific mode you can use mode restrictions to limit it to the modes you want, or you could make the action a "simple condition" based on the modes you want it to work with.

With conditional action:

Exactly what I needed. Thanks you!

Hi @halfrican.ak , if a want turn on a virtual switch then run the rule Trigger Events ( Window Open above ), how to create another rule ? Thanks.

You could just add the virtual switch to the trigger. If you turned on the switch the action would run regardless of whether this windows are open. Not sure if this is what you meant?

Yes, that means , Select Triger Events : contact door sensor + virtual switch ?

Actually, it would mean:

If contact sensor opens OR virtual switch

Since a triggered rule is event-driven you can't have AND as two events cannot happen at the exact same time.

No working, I only receive on my phone : " is ". No device name, no value .

Screenshot of rule please and a summary of what your are trying to do

Here :

I would recommend using a "momentary" virtual switch so it automatically resets to off after you turn it on (setting available in the switch settings).

Thanks, I will try again and let you know.

A little "fancier" way of doing this:

In the Type , I didn't find " momentary". A virtual switch I can set Enable Auto off 1s... If I had 7 windows, 5 door, 50 lights … I need to each IF for each devices ? Can not use %device% ?

Yes "auto off" is what I meant (same thing different wording)

You cannot use %device% because the event (%device%) is the virtual switch not the window/door/light of the condition.

Using the conditional actions would be easy enough for the windows and doors, but would be a pain for the 50 lights, but I'm not sure how you would be able to do this any other way.

Edit: thinking about this more, wouldn't it make more sense to have your lights automatically turn off based on motion? That way this rule would be only used with the contact sensors?

I had some Webcore pistons do these actions. When I at work, use my phone ,at home, use Echo, the pistons run and report to me by Notifications, by voice the status all my doors, windows, fans, lights, switch, temperature outside, inside... I try to make these rule with RM 3.0 but still no luck !!! I keep ST hub, Webcore running for that parts .

Tagging @bravenel to see if he has any ideas on how you could achieve your goal with RM 3.0, like I said I can't think of a way to do it, but that doesn't mean there isn't...

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.