Skip to content

Offer time values across midnight - #669

Open
luantaraschi wants to merge 1 commit into
kellerza:mainfrom
luantaraschi:fix/time-values-midnight-wrap
Open

Offer time values across midnight#669
luantaraschi wants to merge 1 commit into
kellerza:mainfrom
luantaraschi:fix/time-values-midnight-wrap

Conversation

@luantaraschi

Copy link
Copy Markdown

Summary

  • Extend time candidates to 48 hours when a configured window crosses midnight.
  • Keep the current value in the wrapped interval and remove duplicate rendered times.
  • Add a regression test for a 23:00 to 05:00 window.

Closes #667

Testing

  • pytest src/tests/sunsynk (71 passed)
  • pytest src/tests/sunsynk/test_rwsensors.py (10 passed)
  • ruff check src/sunsynk/rwsensors.py src/tests/sunsynk/test_rwsensors.py
  • ruff format --check src/sunsynk/rwsensors.py src/tests/sunsynk/test_rwsensors.py

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.

TimeRWSensor.available_values never offers times past midnight, so a program slot can never move across midnight

1 participant