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

Update the Homeasistant Discovery topics #3332

Merged
merged 7 commits into from
Oct 13, 2024
Merged

Conversation

caco3
Copy link
Collaborator

@caco3 caco3 commented Oct 12, 2024

This PR tries to fix #3331 and #3333


Changes:
- raw has now set the State Class to measurement. Before it was always set to "".
- value has now only set the State Class to total_increasing if the parameter Allow Negative Rates is not set. Else it uses measurement since the rate could also be negative. Before it was always set to total_increasing.
- The rate_per_time_unit topic of an Energy meter needs a Device Class=power. For gas and water it should be volume_flow_rate. Before it was always set to "".

… 2024.10

 - "raw" should have a "State Class" unlike "". -> Set it to "measurement" since it could be decreasing as well as increasing.
Further changes:
 - "value" should only have "State Class"="total_increasing" if "Allow Negative Rates" is NOT set. Else it should use "measurement" as it could go down again.
@caco3 caco3 changed the title Update the Homeasistantr Discovery topics to comply with Homeasistant 2024.10 Update the Homeasistant Discovery topics to comply with Homeasistant 2024.10 Oct 12, 2024
@caco3 caco3 changed the title Update the Homeasistant Discovery topics to comply with Homeasistant 2024.10 Update the Homeasistant Discovery topics Oct 12, 2024
@caco3 caco3 marked this pull request as draft October 12, 2024 21:41
@caco3 caco3 marked this pull request as ready for review October 13, 2024 21:03
@caco3 caco3 merged commit c448ece into main Oct 13, 2024
2 checks passed
@caco3 caco3 deleted the support-homeassistant-2024.10 branch October 18, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot select unit conversion in HomeAssistant Home Assistant state class and unit of measure
1 participant