Skip to content

fix: fix charging for off peak - #922

Open
Lash-L wants to merge 3 commits into
mainfrom
roborock_charging
Open

fix: fix charging for off peak#922
Lash-L wants to merge 3 commits into
mainfrom
roborock_charging

Conversation

@Lash-L

@Lash-L Lash-L commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

This should handle: home-assistant/core#169151

Need a matching HA side change to use the new property.

@Lash-L
Lash-L requested review from allenporter and a lite review from Copilot August 21, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
roborock/data/v1/v1_containers.py 95.01% <100.00%> (+0.07%) ⬆️
roborock/devices/traits/v1/status.py 97.18% <100.00%> (+0.12%) ⬆️
tests/devices/traits/v1/test_status.py 99.13% <100.00%> (+0.03%) ⬆️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

newer off-peak charging logic seamlessly while maintaining backwards compatibility
with older devices.
"""
return self.get_dock_state()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

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.

3 participants