feat(atw): add extended ATW properties for Ecodan heat pumps#16
Open
RaHehl wants to merge 2 commits intoerwindouna:masterfrom
Open
feat(atw): add extended ATW properties for Ecodan heat pumps#16RaHehl wants to merge 2 commits intoerwindouna:masterfrom
RaHehl wants to merge 2 commits intoerwindouna:masterfrom
Conversation
- Add system/zone temperatures, compressor, component status, daily energy - Fix return_temperature_boiler reading wrong API field - Fix PROPERTY_ZONE_*_COOL_FLOW string values with backwards compat - Deprecate Zone.flow/return_temperature
There was a problem hiding this comment.
Pull request overview
Adds extended Air-To-Water (ATW) property coverage for Mitsubishi Ecodan devices by exposing additional MELCloud fields (system temps, zone temps, component status, compressor/demand, and daily energy), while fixing a couple of existing mapping bugs and adding deprecation/backwards-compat paths for renamed properties.
Changes:
- Expose additional ATW properties on
AtwDeviceand new zone-specific temperature properties onZone, plus deprecateZone.flow_temperature/Zone.return_temperature. - Fix boiler return temperature mapping and correct cool-flow property string values; add backwards-compatible write handling for old property strings.
- Extend sample payloads and test scenarios to assert the new properties and deprecation behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/pymelcloud/atw_device.py |
Adds new ATW/zone properties, fixes boiler return mapping, and introduces deprecated aliases + backwards-compatible apply_write() handling. |
tests/test_atw_properties.py |
Expands assertions for new properties and adds tests for deprecated write keys and deprecation warnings. |
tests/samples/atw_2zone_listdevice.json |
Adds daily energy fields to the list-device sample payload. |
tests/samples/atw_2zone_get.json |
Adds DemandPercentage to the device-state sample payload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use PROPERTY_ZONE_*_HEAT_COOL_TEMPERATURE constants in apply_write - Fix docstring grammar for return_temperature_boiler - Extend test to cover both new and deprecated property strings
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.
Summary
Adds ~20 missing ATW device properties that are available from the MELCloud API but were not exposed by pymelcloud. Also fixes two bugs and adds deprecation paths for breaking changes.
Tested against a real Mitsubishi PUD-SHWM120YAA + EHSD-YM9D Hydrobox (2-zone, heat-only, hot water tank).
New properties
System temperatures (on
AtwDevice):flow_temperature— system-level flow temperaturereturn_temperature— system-level return temperaturecondensing_temperatureZone-specific temperatures (on
Zone):zone_flow_temperature— per-zone flow temperaturezone_return_temperature— per-zone return temperatureCompressor & demand:
heat_pump_frequency— compressor frequency in Hzdemand_percentage— current demand (0–100%)Component status (all
bool):boiler_statusbooster_heater1_status,booster_heater2_status,booster_heater2plus_statusimmersion_heater_statuswater_pump1_status..water_pump4_statusvalve_3way_status,valve_2way_statusDaily energy (from
ListDevices/ device_conf):daily_heating_energy_consumed/daily_heating_energy_produceddaily_cooling_energy_consumed/daily_cooling_energy_produceddaily_hot_water_energy_consumed/daily_hot_water_energy_producedBug fixes
return_temperature_boilerwas readingFlowTemperatureBoilerinstead ofReturnTemperatureBoiler— fixed.PROPERTY_ZONE_*_COOL_FLOW_TEMPERATUREstring values were"zone_X_target_heat_cool_temperature"(copy-paste from heat) — fixed to"zone_X_target_cool_flow_temperature".Backwards compatibility
"zone_X_target_heat_cool_temperature") are preserved as deprecated aliases (PROPERTY_ZONE_1_TARGET_HEAT_COOL_TEMPERATURE,PROPERTY_ZONE_2_TARGET_HEAT_COOL_TEMPERATURE).apply_write()accepts both old and new string values.Zone.flow_temperature/Zone.return_temperature: Deprecated withDeprecationWarning. These returned the system-level temperature, not zone-specific. Callers should migrate todevice.flow_temperature(system) orzone.zone_flow_temperature(zone-specific). Return type changed fromfloattoOptional[float]with.get()to preventKeyError.Test coverage
update())test_apply_write_old_cool_flow_property_strings— verifies backwards compat of old property stringstest_zone_flow_return_temperature_deprecation— verifiesDeprecationWarningis emitted