#How to get this sensor into Long term statistics?
1 messages · Page 1 of 1 (latest)
thanks
any suggestion for portions? not sure what type of unit of measure to pick since its just a basic "count" like 1,2,3,4. its literally how many times the pet feeder dispensed
or am i able to free-text type it, and itll work?
Yeah, pretty much any unit of measurement name will work, but if you specify a device class, then the UOM has to be one of the allowed values for that device class
okay so if the UOM isnt in that list, can i just remove DEVICE CLASS and keep UOM and it will still work with long term statistics ?
Yes, device class is not required for LTS
so this will work?
its basically a count of how many times my pet feeder failed
there is no unit for "times"
It will generate LTS with min, average, and max values. Which doesn’t really make sense for a sensor that increments. So instead for that type of sensor you should choose state class = total, or perhaps total_increasing if you expect the sensor to reset to zero at some interval. This will give you LTS with the historical sum which would be much more meaningful.
i dont plan on resetting it. i just wanted it so i could refer back to later to see when my pet feeder failed. do i still need the unit of measurement with state class total ?
I believe you do need to set a unit of measurement (free text or select one). You can add a statistics graph card to your dashboard to verify if statistics start being generated. You should have short-term statistics generated every 5 minutes and long term statistics generated each hour on the hour