Skip to content

Support temperature-range climate destinations - #11

Open
vasi786 wants to merge 1 commit into
Patrick1610:mainfrom
vasi786:fix/temperature-range-destination
Open

Support temperature-range climate destinations#11
vasi786 wants to merge 1 commit into
Patrick1610:mainfrom
vasi786:fix/temperature-range-destination

Conversation

@vasi786

@vasi786 vasi786 commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Adds support for heating-oriented Home Assistant climate destinations that
expose target_temp_low / target_temp_high instead of a single
temperature target.

This fixes compatibility with devices such as Plugwise Emma Wired Pro when
exposed through Zigbee2MQTT.

Behavior

  • Existing single-target destinations remain unchanged.
  • Range destinations:
    • use target_temp_low as the current heating target;
    • write the calculated ClimateSync setpoint to target_temp_low;
    • preserve the existing target_temp_high;
    • clamp the calculated lower target to the existing upper target when needed.
  • Source climate behavior is unchanged.
  • Range target changes trigger immediate reevaluation.
  • Invalid range upper targets fail safely without sending a service call.

Testing

  • Full suite: 110 passed
  • Added coverage for:
    • unchanged single-target behavior;
    • range target reading;
    • preserving target_temp_high;
    • range upper-bound clamping;
    • invalid target_temp_high;
    • range target change reevaluation.

There is one pre-existing Python 3.14 unawaited-coroutine warning in the resync
test harness when running with -W error; this PR does not modify that test.

Manual verification

For climate.emma_wired_pro, this fails:

action: climate.set_temperature
target:
  entity_id: climate.emma_wired_pro
data:
  temperature: 23.5

while this succeeds

action: climate.set_temperature
target:
entity_id: climate.emma_wired_pro
data:
target_temp_low: 23.5
target_temp_high: 26

@vasi786
vasi786 marked this pull request as ready for review August 30, 2026 10:14
@vasi786

vasi786 commented Aug 30, 2026

Copy link
Copy Markdown
Author

Tested successfully on the actual device.

Setup:

  • Home Assistant
  • Plugwise Emma Wired Pro
  • Emma connected through Zigbee2MQTT
  • ClimateSync destination: climate.emma_wired_pro
  • Versatile Thermostat source climates
  • 0.5 °C rounding with ceiling

Real-device test:

  • Emma current temperature: 23.6 °C
  • Main Bedroom current: 23.3 °C
  • Main Bedroom target: 24.1 °C
  • Source delta: +0.8 °C
  • ClimateSync calculated destination setpoint: 24.5 °C

Emma then reported:

24.5 °C - 26.0 °C

So target_temp_low was updated to 24.5 °C while the existing target_temp_high remained unchanged at 26.0 °C.

ClimateSync reported:

  • Destination Current Target: 24.5 °C
  • Status: ok

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.

1 participant