@@ -191,7 +191,10 @@ def target_temperature(self) -> float:
191191 if self ._local_target_temperature is not None :
192192 return self ._local_target_temperature
193193 else :
194- return self ._target_temperature
194+ return (
195+ (self ._target_temperature - self ._local_offset )
196+ if self ._target_temperature is not None else None
197+ )
195198
196199 async def async_set_hvac_mode (self , hvac_mode ):
197200 """Set new target hvac mode."""
@@ -293,30 +296,20 @@ def handle_event(self, message: OWNHeatingEvent):
293296 message .human_readable_log ,
294297 )
295298 self ._target_temperature = message .set_temperature
296- self ._local_target_temperature = (
297- self ._target_temperature + self ._local_offset
298- )
299299 elif message .message_type == MESSAGE_TYPE_LOCAL_OFFSET :
300300 LOGGER .info (
301301 "%s %s" ,
302302 self ._gateway_handler .log_id ,
303303 message .human_readable_log ,
304304 )
305305 self ._local_offset = message .local_offset
306- if self ._target_temperature is not None :
307- self ._local_target_temperature = (
308- self ._target_temperature + self ._local_offset
309- )
310306 elif message .message_type == MESSAGE_TYPE_LOCAL_TARGET_TEMPERATURE :
311307 LOGGER .info (
312308 "%s %s" ,
313309 self ._gateway_handler .log_id ,
314310 message .human_readable_log ,
315311 )
316312 self ._local_target_temperature = message .local_set_temperature
317- self ._target_temperature = (
318- self ._local_target_temperature - self ._local_offset
319- )
320313 elif message .message_type == MESSAGE_TYPE_MODE :
321314 if (
322315 message .mode == CLIMATE_MODE_AUTO
@@ -408,9 +401,6 @@ def handle_event(self, message: OWNHeatingEvent):
408401 self ._attr_hvac_mode = HVACMode .OFF
409402 self ._attr_hvac_action = HVACAction .OFF
410403 self ._target_temperature = message .set_temperature
411- self ._local_target_temperature = (
412- self ._target_temperature + self ._local_offset
413- )
414404 elif message .message_type == MESSAGE_TYPE_ACTION :
415405 LOGGER .info (
416406 "%s %s" ,
0 commit comments