Skip to content

Change no thermostat schedule defined representation - #899

Merged
bouwew merged 9 commits into
mainfrom
schedule_null
Jul 20, 2026
Merged

Change no thermostat schedule defined representation#899
bouwew merged 9 commits into
mainfrom
schedule_null

Conversation

@bouwew

@bouwewbouwew commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

At present, no thermostat schedule defined result in:

  • available_schedules = []
  • selected_schedule = None

In HA this will lead to the related Select not being shown.

When a user defines a schedule, this change will not be picked up automatically by the Plugwise integration. An integration-reload will be required to show the user-update.

Proposed solution: show off as a the single option when no schedule is defined. This should result in the Select being present with no other options to select. When the user creates a schedule the change should automatically be picked up.

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

    • Thermostats without a defined schedule now consistently show the “off” option instead of blank/undefined values.
    • Schedule availability and the currently selected schedule stay consistent between current and legacy thermostat setups.
    • The “off” option is now listed first in schedule selections for easier access.
  • Documentation

    • Updated release notes/changelog to reflect the new “no thermostat schedule” representation.

@coderabbitai

coderabbitaiBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 041ca68c-ce22-4430-8f45-d78aced1b7ae

📥 Commits

Reviewing files that changed from the base of the PR and between 70bd7c6 and 30103db.

📒 Files selected for processing (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

📝 Walkthrough

Walkthrough

Thermostat schedule handling now uses off instead of None for the no-schedule state. Runtime logic, legacy handling, fixtures, test data, and the changelog were updated, with off placed first in available schedule lists.

Changes

Schedule off standardization

Layer / File(s)Summary
Runtime schedule sentinel handling
plugwise/data.py, plugwise/helper.py, plugwise/legacy/*
Schedule defaults, selection values, climate-mode checks, and schedule ordering now use OFF instead of NONE.
Fixture schedule expectations
fixtures/*/data.json
Fixture data uses "off" for schedules without defined rules and places it first in available schedule arrays.
Test data schedule expectations
tests/data/adam/*, tests/data/anna/*, tests/data/stretch/*
Test fixtures mirror the updated schedule values and ordering, with related array formatting updates.
Changelog update
CHANGELOG.md
The changelog records the None to off representation change.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels:bug

Suggested reviewers:compatech

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title matches the main change: representing an undefined thermostat schedule as off.
Docstring Coverage✅ PassedDocstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch schedule_null

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot added the enhancement New feature or request label Jul 19, 2026
@bouwewbouwew changed the title Change no thermostat schedule definedChange no thermostat schedule defined representationJul 19, 2026
@bouwew
bouwew marked this pull request as ready for review July 19, 2026 15:17
@bouwew
bouwew requested a review from a team as a code ownerJuly 19, 2026 15:17
@codecov

codecovBot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ce32275) to head (30103db).

Additional details and impacted files
@@ Coverage Diff @@## main #899 +/- ##
=========================================
Coverage 100.00% 100.00% =========================================
Files 21 21 Lines 3508 3502 -6 =========================================
- Hits 3508 3502 -6 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai
coderabbitaiBot requested a review from CoMPaTechJuly 20, 2026 06:13
@coderabbitaicoderabbitaiBot added bug Something isn't working and removed enhancement New feature or request labels Jul 20, 2026
@bouwew
bouwew merged commit 00c25bf into mainJul 20, 2026
18 checks passed
@bouwew
bouwew deleted the schedule_null branch July 20, 2026 06:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bouwew@CoMPaTech