Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 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
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