HandyHat / ha-hildebrandglow-dcc

Home Assistant integration for UK SMETS (Smart) meters pulling data from the DCC via the Hildebrand Glow API
MIT License
229 stars 31 forks source link

State class for tariff standing & rate sensors are not set #288

Closed markcocker closed 1 year ago

markcocker commented 1 year ago

Describe the bug

HA statistics page reports that the state class of the following entities are not supported:

To Reproduce

  1. Go to Developer Tools > Statistics /developer-tools/statistics
  2. See error.

Expected behaviour HA to report no issues.

Screenshots

Screenshot 2023-01-03 at 12 32 53

Version 1.0.2

HandyHat commented 1 year ago

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.

markcocker commented 1 year ago

Thanks for the update. I have clicked "fix issue" on each of the sensors, restarted, and not seen any other problems.