From 409432304303927fefe50f85e4b1539c5063921a Mon Sep 17 00:00:00 2001 From: magnuselden Date: Thu, 12 Sep 2024 21:53:16 +0200 Subject: [PATCH] misc --- custom_components/peaqhvac/sensors/offsetsensor.py | 2 +- .../peaqhvac/service/hvac/offset/offset_coordinator.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/peaqhvac/sensors/offsetsensor.py b/custom_components/peaqhvac/sensors/offsetsensor.py index a727717..b49c85e 100644 --- a/custom_components/peaqhvac/sensors/offsetsensor.py +++ b/custom_components/peaqhvac/sensors/offsetsensor.py @@ -49,7 +49,7 @@ async def async_update(self) -> None: self._raw_offsets = offsetsmodel.raw_offsets self._peaks_today, self._peaks_tomorrow = offsetsmodel.peaks - self._current_offset = data.current_offset + self._current_offset = self._hub.offset.current_offset self._tempdiff_offset = data.current_tempdiff self._tempextremas_offset = data.current_temp_extremas self._temptrend_offset = data.current_temp_trend_offset diff --git a/custom_components/peaqhvac/service/hvac/offset/offset_coordinator.py b/custom_components/peaqhvac/service/hvac/offset/offset_coordinator.py index 5c2df52..589db91 100644 --- a/custom_components/peaqhvac/service/hvac/offset/offset_coordinator.py +++ b/custom_components/peaqhvac/service/hvac/offset/offset_coordinator.py @@ -54,7 +54,6 @@ def current_offset(self) -> int: latest_key = max((key for key in self.model.raw_offsets if key <= datetime.now()), default=None) if latest_key is not None: ret = self.model.raw_offsets[latest_key] - _LOGGER.debug(f"Current (raw) offset: {ret}") except KeyError as e: _LOGGER.error( f"Unable to get current offset: {e}. raw_offsets: {self.model.raw_offsets}"