Universal Leak Sensor Dashboard Tile

Hello,

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.

Any Ideas?

Thanks Again
Matt

I cannot quite remember but I believe you need to use the "Water" template.

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.

Thanks
Matt

Community app, descriptive device names are good for location

1 Like

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.

1 Like

In practice, that all looks like this...

Picture4

Picture5

Please share the rule if you have time, I love it :slight_smile:

Thanks
Matt

It's pretty simple, really...

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.

Thank you so much, I will have to get up to speed with the virtual omni sensor driver, but this looks fun.

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.

Thanks
Matt

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.

It should look something like this...

Thank you :slight_smile:
How did you get the sensor name to populate in the %device% variable, I think I am close :slight_smile:

That won’t change til the rule actually runs. Then the triggering device will populate into the %device% variable.

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.

Do I need to define a local variable also?

No that will populate automatically when the rule triggers, as I said.

According to your screenshot, your rule will not actually trigger until ALL your leak sensors report as wet.

Presumably that’s not what you intended.

I think I have it at Any Wet or All Dry.