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

fix: update device and state class constants #21

Merged
merged 12 commits into from
Sep 22, 2022

Conversation

luuuis
Copy link
Owner

@luuuis luuuis commented Dec 22, 2021

Several fixes relating to the unit, device class and state class for each sensor.

  1. Removed usage of deprecated DEVICE_CLASS_ and STATE_CLASS_ constants as per Migrate sensor device classes to StrEnum home-assistant/core#60654.
  2. Use reactive/apparent power classes introduced in Add sensor device classes for apparent and reactive power home-assistant/core#62010
  3. Require HA version 2022.2.0.
  4. Use correct units for reactive power (var) and energy (varh).
  5. Reactive energy sensors use state_class: total_increasing instead of state_class: measurement.

@luuuis
Copy link
Owner Author

luuuis commented Dec 26, 2021

This breaks compatibility for HA < 2021.12 so I won't merge this just yet.

@luuuis luuuis changed the title chore: update device and state class constants bug: update device and state class constants Sep 19, 2022
@luuuis luuuis mentioned this pull request Sep 19, 2022
@luuuis luuuis merged commit af4bd7a into main Sep 22, 2022
@luuuis luuuis deleted the update-device-and-state-class branch September 22, 2022 21:17
@luuuis luuuis changed the title bug: update device and state class constants fix: update device and state class constants Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants