Hey im using this trend sensor in order to know when i have water consumption or not (and in order to create automations and alerts when it’s on for long periods.
Teleperiod is set to 10s on the tasmota, so the sensor.water_meter refreshes every 10 sec.
The trend sensor does detect water flow, but does not turn off when the flow is off.
What am i missing?
edit: added min_gradient: 0.01 still not returning to off state
I just started using trend sensors, and ran into the same issue.
My incoming data comes from a homegrown restful sensor. Setting THAT sensor to include “force_update: true” seems to have fixed it for me.
I think that all that was happening is that if the inbound sensor didn’t change across subsequent tests (e.g. no water flowing), it didn’t update. With force_update you’re forcing an update with the unchanged value, causing the trend sensor to recalculate and turn off.
$0.02
Edit to add: and “min_gradient: 0.00001” in the trend sensor seems to help squelch some oddities which I’m guessing could be float conversion issues. I’m seeing e-18 sized numbers triggering the trend sensor to on, which resolved themselves with this addition.