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

Pre-calculate battery stats based on GivTCP UoM attribute #22

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

Codegnosis
Copy link
Owner

Resolves #21 - the card did not previously take into account the configurable unit_of_measurement attribute available in the GivTCP entities. This PR fixes the issue, in addition to refactoring the code to pre-calculate all statistics during render time in a single object. Thanks to @gcoan for reporting the issue.

  • Add GivTcpBatteryStats type
  • Add setRawValues method to grab GivTCP data at render time
  • Pre-calculate battery stats based on raw values and GivTCP's unit_of_measurement value if available

@Codegnosis Codegnosis merged commit 1145fc7 into main Jan 15, 2024
1 check passed
@Codegnosis Codegnosis deleted the develop branch January 15, 2024 10:26
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.

Card doesn’t take account of kW unit of measure
1 participant