Skip to content

Commit

Permalink
Fix error with Climate NS #1100
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Feb 4, 2023
1 parent 5a1fe7c commit 68cbfef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions custom_components/sonoff/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,12 @@ def set_state(self, params: dict):
# correction could be optional
# https://github.com/AlexxIT/SonoffLAN/issues/812
if "temperature" in params or "tempCorrection" in params:
self._attr_current_temperature = cache["temperature"] + cache.get(
"tempCorrection", 0
)
try:
# https://github.com/AlexxIT/SonoffLAN/issues/1100
self._attr_current_temperature = cache["temperature"]
self._attr_current_temperature += cache.get("tempCorrection", 0)
except:
pass

@staticmethod
def get_params(hvac_mode: str) -> dict:
Expand Down

0 comments on commit 68cbfef

Please sign in to comment.