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

Add entities for battery status #349

Merged
merged 11 commits into from
Jan 19, 2024
Merged

Add entities for battery status #349

merged 11 commits into from
Jan 19, 2024

Conversation

weltenwort
Copy link
Owner

📝 Summary

This is based on @oliverrahner's work in #296. It adds a new entity "Battery Status" that tries to interpret an undocumented bitfield to deduce the battery status.

closes #21
closes #264

🔎 Implementation details

This is based off the register battery.bat_status as reverse-engineered by @oliverrahner and @SaxonWood in #264.

The currently implemented states are

  • normal
  • calibrating
  • balancing
  • other

The state "other" is a catch-all for all unknown combinations of bits in the bitfield. Any hints as to their meaning would be very welcome so we can improve this sensor. For debugging purposes the bitfield attribute exposes the raw values so new unknown combinations can be observed.

🎨 Previews

image

@weltenwort weltenwort added python Pull requests that update Python code minor version This change warrants a minor release labels Jan 19, 2024
@weltenwort weltenwort self-assigned this Jan 19, 2024
@weltenwort weltenwort merged commit 6bb07dd into main Jan 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor version This change warrants a minor release python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Battery calibration Query battery status
2 participants