Displaying the status of multiple devices in a single push notification

I have searched the forum and google, but could not find an answer/solution to my problem.

I have a door with two contact switches on it. One is a wired contact sensor to my Honeywell alarm system, which interfaces with Hubitat through an Envisalink module, and a second Z-Wave door/window contact sensor on the same door as well. The reason for this is because Hubitat uses an Envisalink module to monitor the status of the wired sensors on my Honewell Vista alarm system and sometimes the hub does not catch the door closed event and I continue to receive the door open push notifications every 3 minutes (as designed), until the door is re-opened and closed again. Because of that, I decided to also install a Z-wave contact sensor on the door as well. The Z-Wave door sensor is very sensitive, so the device can show as closed in Hubitat without the door being completely closed (still cracked open a little). The two sensors compliment one another.

What I would like to do is to modify my current door open rule so that when I receive the push notification, it tells me the status of both the wired contact switch (which triggered the rule), as well as the z-wave contact switch. The push notification would look something like, "The front door has been open for 3 minutes. Wired Contact - 'OPEN' Wireless Contact - 'CLOSED'" Using the built-in variables of rule machine, it seems as though I will only receive the status of the device that triggered the rule using the %value% statement within the text of the push notification. Is there a way to display the values of the device that triggered the rule and another device, within the same push notification? I know that I can create a global variable and create yet another rule that sets that global variable each time the door is opened and closed, and then use that in my notification, but I am trying to keep my rule count down so that my hub (C4) doesn't get even slower.

Thanks for your help!

1 Like

This can be achieved by:

  1. Create a local variable
  2. Use Set Variable -> Device Attribute
  3. Chose the attribute you want to report on the chosen device.

If both devices may trigger the rule, then you might want to create two local variables and set one to the wired sensor and the other to the Z-Wave one.

Add the variable as %variableName% in your notification rule (where variableName is replaced by the name you gave to your variable).

1 Like

I don't know why I didn't consider setting a local variable within the rule. That worked perfectly, thanks a lot!

3 Likes

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