State class for tariff standing & rate sensors are not set
markcocker opened this issue · 2 comments
Describe the bug
HA statistics page reports that the state class of the following entities are not supported:
- DCC Sourced smart electricity meter Standing charge (sensor.electric_tariff_standing)
- DCC Sourced smart electricity meter Rate (sensor.electric_tariff_rate)
- DCC Sourced smart gas meter Standing charge (sensor.gas_tariff_standing)
- DCC Sourced smart gas meter Rate (sensor.gas_tariff_rate)
To Reproduce
- Go to Developer Tools > Statistics /developer-tools/statistics
- See error.
Expected behaviour
HA to report no issues.
Version
1.0.2
Hey @markcocker, does this cause any problems elsewhere?
The reason this issue is being reported is that these sensors used to have a state class of measurement and thus have long-term statistics calculated for them. However, looking at the docs (https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes), I don't think they should have done as they aren't a measurement of anything, so I removed the state class.
It should be safe to remove the long term statistics by clicking fix issue, remove.
Thanks for the update.
I have clicked "fix issue" on each of the sensors, restarted, and not seen any other problems.