Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
markcocker opened this issue Jan 3, 2023 · 2 comments
Closed

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

markcocker opened this issue Jan 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@markcocker
Copy link

markcocker commented Jan 3, 2023

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

  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

@markcocker markcocker added the bug Something isn't working label Jan 3, 2023
@HandyHat
Copy link
Owner

HandyHat commented Jan 3, 2023

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
Copy link
Author

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

@HandyHat HandyHat closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants