fix: fix charging for off peak - #922
Open
Lash-L wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 9 files with indirect coverage changes 🚀 New features to boost your workflow:
|
allenporter
approved these changes
Aug 23, 2026
| newer off-peak charging logic seamlessly while maintaining backwards compatibility | ||
| with older devices. | ||
| """ | ||
| return self.get_dock_state() |
Contributor
There was a problem hiding this comment.
why is it ok to have two versions, one with an extra input and one not? I think it implies that this method be determined by the container, since it needs device features as input.
I would say: (1) the current dock_state property needs to be deprecated and (2) the method below should be a function that takes as input state, battery, and is_supported_valley_electricity and is called from the trait.
(What is in this PR works in practice because the trait overrides the dock_state method, so I can approve, but i think this should be cleaned up)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This should handle: home-assistant/core#169151
Need a matching HA side change to use the new property.