diff --git a/pyrinnaitouch/system.py b/pyrinnaitouch/system.py index a4f92b5..c635c56 100644 --- a/pyrinnaitouch/system.py +++ b/pyrinnaitouch/system.py @@ -1,8 +1,8 @@ """Main system control""" import logging import queue -from typing import Any from datetime import datetime +from typing import Any from .const import RinnaiSystemMode, RinnaiUnitId @@ -107,7 +107,11 @@ def poll_loop(self) -> None: if "sys.exit" in new_status_json: self._connection.shutdown() break - if isinstance(new_status_json, list) and "SYST" in new_status_json[0] and "STM" in new_status_json[0]["SYST"]: + if ( + isinstance(new_status_json, list) + and "SYST" in new_status_json[0] + and "STM" in new_status_json[0]["SYST"] + ): self._status.set_timesetting(True) self._on_updated() else: diff --git a/pyrinnaitouch/system_status.py b/pyrinnaitouch/system_status.py index 4b274a3..54a2e73 100644 --- a/pyrinnaitouch/system_status.py +++ b/pyrinnaitouch/system_status.py @@ -146,4 +146,4 @@ def set_capabilities(self, avm: Any) -> None: def set_timesetting(self, is_setting: bool) -> None: """Set system into time setting mode""" - self.is_timesetting = is_setting \ No newline at end of file + self.is_timesetting = is_setting