I am trying to create a Hubitat Dashboard tile that will alert me when I have a leak on any of my multiple leak sensors. The HSM dashboard option is giving me arming/disarming info, which is not want I am wanting.
Yes that works for each individual sensor but can we create a universal tile that includes all sensors so you know there is a leak and then can look at the specific location after. I have like 15 leak sensors and it is a lot for one screen.
You have a couple of options using Tile Builder. You could have table with a filtered list that only shows leak sensors in the "wet" state. Alternatively you can have a table with all of your sensors listed and have it sorted so that any "wet" sensors are at the top. Lastly, you can use highlighting to change appearance of any sensors in the"wet" state.
What I've done is create an additional virtual leak sensor and then written a RM rule to update that to show a leak if any of my physical leak sensors report water. The virtual sensor reports as dry only if all of my physical sesnors are dry. So I just need to display the virtual sensor as a tile in my dashboard.
I also record the name of the specifc leak sensor detecting water in a variable and then display that value on another tile with a transparent background sitting on top of the first. The variable is changed to " " when all the sensors are dry.
So the first tile looks/acts like a regular leak sensor tile, changing the color and icon if any of the sensors report water, and the second tile identifies which specific sensor is being triggered.
The triggers are just any of the physical leak sensors changing status. I first set the variable (it's a variable of the virtual device itself, BTW) to whichever device acted as the trigger. Then a couple of if/thens to set the virtual device to wet or dry. If everything is all dry, then I switch the variable back to blank.
It would technically probably be more efficient if I set the variable as part of that first if/then clause instead of right at the outset, but it's just how I happened to set it up and since it works, I haven't bothered mucking with it.
Oh, I'll point out, too, that my virtual leak sensor uses the Virtual Omni Sensor driver. That's how I'm able to store the variable with the device itself.
Did you write this in Rule Machine Legacy or the new version? I am a bit new to variables and have not written any new rules on the newer version of Rule Machine.
It was written with RM 5 but since the variable is in the device driver and not part of RM, that should not have an impact on which version of RM you use.
Within the rule, select Run Custom Action and choose your virtual device. If the device is using the Virtual Omni Sensor driver, one of the options should be setVariable. You can either type in something manually or use %device% to plug in the name of whichever device triggered the rule in the first place.
The %device% wont populate until/unless the rule is triggered by another device. If you just use the Run Actions button, it wont have anything to populate the variable with.
Also, I noticed in your screen shot that the second if/then is incorrect. You have it set to check to see if ANY of the physical sensors are dry, which means that it will always run unless every single one of your sensors is wet. You want to set it to check to make sure ALL of the sensors are reporting as dry.
OK I think I am closer but the tile did not update on my dashboard when I ran a leak test. I created a Leak Tile using the "Water" template with no other modifications.