Include both old and new entities for a step-wise introduction of water_heaters in HA#895
Conversation
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/data/anna/anna_heatpump_heating_UPDATED_DATA.json (1)
13-39: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
UPDATED_DATAfixture is missing new schema fields present in the base fixture.
anna_heatpump_heating_UPDATED_DATA.json(device1cbf783bb11e4a7c8a6843dee3a86927) is inconsistent with its base fixtureanna_heatpump_heating.json:
- Missing
max_dhw_temperature(base has it at lines 38–44).- Missing
sensors.water_temperature(base has it at line 60).- Uses
select_dhw_mode(line 28) instead ofdhw_mode(base usesdhw_modeat line 32).Since UPDATED_DATA represents the same device after a state refresh, it should match the base fixture's schema. These omissions will cause test assertions against the new fields to fail or be silently skipped.
🔧 Proposed fix to align UPDATED_DATA with the base fixture schema
"location": "a57efe5f145f498c9be62a9b63626fbf", + "max_dhw_temperature": { + "current": 46.3, + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, "maximum_boiler_temperature": { "current": 29.1, "setpoint": 60.0, "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 1.0 }, "model": "Generic heater/cooler", "name": "OpenTherm", - "select_dhw_mode": "eco", + "dhw_mode": "eco", "sensors": { "intended_boiler_temperature": 35.0, "modulation_level": 52, "return_temperature": 25.1, "water_pressure": 1.57, - "outdoor_air_temperature": 3.0 + "outdoor_air_temperature": 3.0, + "water_temperature": 29.1 }, "switches": { "dhw_cm_switch": false },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/data/anna/anna_heatpump_heating_UPDATED_DATA.json` around lines 13 - 39, Update the anna_heatpump_heating_UPDATED_DATA fixture for device 1cbf783bb11e4a7c8a6843dee3a86927 to match the base fixture schema: add max_dhw_temperature, add sensors.water_temperature, and rename select_dhw_mode to dhw_mode. Preserve the existing values and structure while aligning these fields with anna_heatpump_heating.json.
🧹 Nitpick comments (1)
plugwise/common.py (1)
298-302: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUpdate the stale docstring.
The docstring still references the old names
dhw_temperatureandboiler_temperature, and claims "the copied sensor data is removed." With the rename tomax_dhw_temperature/maximum_boiler_temperatureand the intentional retention ofwater_temperaturein sensors, both claims are now inaccurate.📝 Proposed docstring update
- """Create dhw_temperature and boiler_temperature dicts. - - The initial item-names are updated and a current key is added. - Also, the copied sensor data is removed. - """ + """Create max_dhw_temperature and maximum_boiler_temperature dicts. + + The initial item-names are updated and a current key is added. + The copied sensor data is removed for dhw_temperature, while + water_temperature is kept in sensors for step-wise introduction. + """🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugwise/common.py` around lines 298 - 302, The docstring for the method creating the temperature dictionaries is stale. Update it to reference max_dhw_temperature and maximum_boiler_temperature, and describe the current sensor-data behavior accurately by noting that water_temperature is retained in sensors.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@fixtures/m_adam_heating/data.json`:
- Around line 16-34: Update the fixture values for max_dhw_temperature.current
and maximum_boiler_temperature.current to 43.0, matching
sensors.water_temperature, while leaving the surrounding bounds, setpoints, and
sensor data unchanged.
---
Outside diff comments:
In `@tests/data/anna/anna_heatpump_heating_UPDATED_DATA.json`:
- Around line 13-39: Update the anna_heatpump_heating_UPDATED_DATA fixture for
device 1cbf783bb11e4a7c8a6843dee3a86927 to match the base fixture schema: add
max_dhw_temperature, add sensors.water_temperature, and rename select_dhw_mode
to dhw_mode. Preserve the existing values and structure while aligning these
fields with anna_heatpump_heating.json.
---
Nitpick comments:
In `@plugwise/common.py`:
- Around line 298-302: The docstring for the method creating the temperature
dictionaries is stale. Update it to reference max_dhw_temperature and
maximum_boiler_temperature, and describe the current sensor-data behavior
accurately by noting that water_temperature is retained in sensors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e370258b-bcdb-46b4-a0fe-5b2299329a43
📒 Files selected for processing (67)
fixtures/adam_bad_thermostat/data.jsonfixtures/adam_heatpump_cooling/data.jsonfixtures/adam_jip/data.jsonfixtures/adam_onoff_cooling_fake_firmware/data.jsonfixtures/adam_plus_anna/data.jsonfixtures/adam_plus_anna_new/data.jsonfixtures/adam_plus_anna_new_regulation_off/data.jsonfixtures/anna_elga_2/data.jsonfixtures/anna_elga_2_cooling/data.jsonfixtures/anna_elga_2_schedule_off/data.jsonfixtures/anna_elga_no_cooling/data.jsonfixtures/anna_heatpump_cooling/data.jsonfixtures/anna_heatpump_cooling_fake_firmware/data.jsonfixtures/anna_heatpump_heating/data.jsonfixtures/anna_loria_cooling_active/data.jsonfixtures/anna_loria_driessens/data.jsonfixtures/anna_loria_heating_idle/data.jsonfixtures/anna_p1/data.jsonfixtures/anna_v4/data.jsonfixtures/anna_v4_dhw/data.jsonfixtures/anna_v4_no_tag/data.jsonfixtures/legacy_anna/data.jsonfixtures/legacy_anna_2/data.jsonfixtures/m_adam_cooling/data.jsonfixtures/m_adam_heating/data.jsonfixtures/m_adam_heating_off_schedule/data.jsonfixtures/m_adam_jip/data.jsonfixtures/m_anna_heatpump_cooling/data.jsonfixtures/m_anna_heatpump_idle/data.jsonplugwise/common.pyplugwise/constants.pyplugwise/data.pyplugwise/helper.pyplugwise/legacy/helper.pyplugwise/smile.pyscripts/manual_fixtures.pytests/data/adam/adam_bad_thermostat.jsontests/data/adam/adam_heatpump_cooling.jsontests/data/adam/adam_jip.jsontests/data/adam/adam_onoff_cooling_fake_firmware.jsontests/data/adam/adam_plus_anna.jsontests/data/adam/adam_plus_anna_new.jsontests/data/adam/adam_plus_anna_new_regulation_off.jsontests/data/anna/anna_elga_2.jsontests/data/anna/anna_elga_2_cooling.jsontests/data/anna/anna_elga_2_cooling_UPDATED_DATA.jsontests/data/anna/anna_elga_2_schedule_off.jsontests/data/anna/anna_elga_no_cooling.jsontests/data/anna/anna_heatpump_cooling.jsontests/data/anna/anna_heatpump_cooling_fake_firmware.jsontests/data/anna/anna_heatpump_heating.jsontests/data/anna/anna_heatpump_heating_UPDATED_DATA.jsontests/data/anna/anna_loria_cooling_active.jsontests/data/anna/anna_loria_driessens.jsontests/data/anna/anna_loria_heating_idle.jsontests/data/anna/anna_p1.jsontests/data/anna/anna_v4.jsontests/data/anna/anna_v4_UPDATED_DATA.jsontests/data/anna/anna_v4_dhw.jsontests/data/anna/anna_v4_no_tag.jsontests/data/anna/anna_without_boiler_fw441.jsontests/data/anna/legacy_anna.jsontests/data/anna/legacy_anna_2.jsontests/test_adam.pytests/test_anna.pytests/test_init.pytests/test_legacy_anna.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #895 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 3503 3504 +1
=========================================
+ Hits 3503 3504 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pyproject.toml`:
- Line 7: Align the package version in the pyproject version setting with the
changelog’s v1.14.0 release label. Update the prerelease value so published
metadata consistently represents the intended stable release.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9c0bb495-5961-4bd7-a995-352e1c44e552
📒 Files selected for processing (26)
CHANGELOG.mdfixtures/adam_bad_thermostat/data.jsonfixtures/adam_heatpump_cooling/data.jsonfixtures/adam_onoff_cooling_fake_firmware/data.jsonfixtures/anna_elga_no_cooling/data.jsonfixtures/anna_heatpump_heating/data.jsonfixtures/anna_loria_cooling_active/data.jsonfixtures/anna_loria_driessens/data.jsonfixtures/anna_loria_heating_idle/data.jsonfixtures/m_adam_heating/data.jsonfixtures/m_adam_heating_off_schedule/data.jsonfixtures/m_anna_heatpump_cooling/data.jsonfixtures/m_anna_heatpump_idle/data.jsonplugwise/common.pypyproject.tomlscripts/manual_fixtures.pytests/data/adam/adam_bad_thermostat.jsontests/data/adam/adam_heatpump_cooling.jsontests/data/adam/adam_onoff_cooling_fake_firmware.jsontests/data/anna/anna_elga_no_cooling.jsontests/data/anna/anna_heatpump_heating.jsontests/data/anna/anna_loria_cooling_active.jsontests/data/anna/anna_loria_driessens.jsontests/data/anna/anna_loria_heating_idle.jsontests/test_adam.pytests/test_anna.py
🚧 Files skipped from review as they are similar to previous changes (23)
- fixtures/anna_elga_no_cooling/data.json
- fixtures/adam_bad_thermostat/data.json
- tests/data/anna/anna_elga_no_cooling.json
- tests/data/anna/anna_loria_heating_idle.json
- plugwise/common.py
- fixtures/anna_loria_heating_idle/data.json
- fixtures/m_adam_heating_off_schedule/data.json
- tests/test_adam.py
- fixtures/m_adam_heating/data.json
- fixtures/m_anna_heatpump_idle/data.json
- tests/data/adam/adam_onoff_cooling_fake_firmware.json
- tests/data/anna/anna_loria_cooling_active.json
- fixtures/m_anna_heatpump_cooling/data.json
- tests/data/anna/anna_heatpump_heating.json
- fixtures/adam_onoff_cooling_fake_firmware/data.json
- tests/test_anna.py
- scripts/manual_fixtures.py
- tests/data/anna/anna_loria_driessens.json
- tests/data/adam/adam_bad_thermostat.json
- fixtures/adam_heatpump_cooling/data.json
- fixtures/anna_loria_driessens/data.json
- tests/data/adam/adam_heatpump_cooling.json
- fixtures/anna_loria_cooling_active/data.json
|


Summary by CodeRabbit
water_temperaturereadings to compatible heating and cooling devices.dhw_cm_switch) where available.water_heatersintroduction (v1.14.0a0).