Grouping Leak Sensors

I’m trying to find a way to group leak sensors into a single aggregated state. I’d like to be able to run an automation based on if ANY leak sensor senses water, without having a half dozen copies of the same automation running. Is there a good way to do this?

This should be possible using a binary sensor group.

That’s a great suggestion. I’m having a little trouble with the State Template syntax though. I’m trying this and it’s not working

{{is_state('binary_sensor.kitchen_sink_leak_sensor','Wet')
or
is_state('binary_sensor.water_main_leak_sensor','Wet') }}
device_class: moisture

I think you need to replace 'Wet' with 'on'.

In case you haven’t found it yet, you can test out templates using Developer Tools in the sidebar > Template tab. For example, you can try {{ states('binary_sensor.kitchen_sink_leak_sensor') }} to see what the state is right now.

However, I still wouldn’t bother with a template sensor and would just use a group instead.

However, I still wouldn’t bother with a template sensor and would just use a group instead.

Sorry, maybe I’m confused then. When I go to create a sensor group there is a required field called “State Template” that’s not optional.

did you use this first option?

1 Like

I didn’t I was under a different menu, thank you that helps a lot!