Some help with setting up the Trend sensor

I have installed a water meter sensor on my meter to track water usage at home. The sensor measures in litres and updates every few seconds.

I am wanting to detect if there is a leak/burst pipe and thru help from the forum, the Trend sensor was suggested, but I need some advice with setting it up.

What I am trying to achieve, is for the sensor to trigger if >35 litres of water is used each min, continuing for a period of 5 minutes. I know this could generate some false alarms, but I thought I will add some conditions in an automation later.

I just want to confirm what I should enter in the config.

The minimum rate, should I enter 0.5? (35/60)

Duration to store samples, should this be 300 seconds?

Minimum / max number of stores samples, what value should I add here?

Thanks for your help

The options are explained here:

As you can see the min_gradient is measured in “units per second”. So 35/3600.

You can leave the rest as default.

To use your trend sensor to detect this:

Use the following trigger:

trigger:
  - platform: state
    entity_id: binary_sensor.your_water_trend_here
    to: 'on'
    for:
      minutes: 5

This will only trigger if your flow is greater than 35 L/min for 5 minutes continuously (no included drops below this rate).

You could of course also just do this without the trend sensor (not sure who told you it was needed):

trigger:
  - platform: numeric_state
    entity_id: sensor.your_flow_sensor_here
    above: 35
    for:
      minutes: 5
1 Like

Appreciate this Tom

1 Like