I’m trying to figure out how to calculate the water usage per minute now.
With now I really mean, now. I don’t want to wait a minute or 2 minutes to get the average from the last minutes or so.
I receive my water meter counter from MQTT like this:
[1665602970,1373215,"L"] @ 21:29:30
[1665602964,1373214.5,"L"] @ 21:29:24
[1665602959,1373214,"L"] @ 21:29:19
[1665602954,1373213.5,"L"] @ 21:29:14
[1665602382,1373213,"L"] @ 21:15:00
The timestamps are added just to give an idea of what happens when you don’t use water.
@ 21:29:14, this is the first report after not using water for almost 15 minutes.
Then I opened the faucet for about 15 seconds and 2L was consumed (1373215 - 1373213).
A quick calculation learns that I’m consuming 8L/min.
I already have ‘1373215’ (the readings) in a sensor.water_meterstand
Now, how can I calculate this?
Is a utility_meter
an option, or some statistics
sensor ?
How do I get started?
Thanks for the tips.