Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuselden authored and magnuselden committed Sep 12, 2024
1 parent 5e0766f commit 4094323
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/peaqhvac/sensors/offsetsensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 4094323

Please sign in to comment.