#How to get this sensor into Long term statistics?

1 messages · Page 1 of 1 (latest)

marble bay
#

Am I doing something wrong?

balmy light
#

It needs a unit of measurement besides the state class

#

it can be portions

marble bay
#

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?

rustic island
#

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

marble bay
#

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 ?

balmy light
#

Yes, device class is not required for LTS

marble bay
#

so this will work?

#

its basically a count of how many times my pet feeder failed

#

there is no unit for "times"

polar portal
# marble bay so this will work?

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.

marble bay
polar portal
#

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

timid ravine
#

I just checked to confirm and I don't think a unit is actually required.

#

a state class alone is enough for statistics AFAIK