From aa5469a176ae066cbeb249bd5886ea4086f38593 Mon Sep 17 00:00:00 2001 From: Fabiano Cattaneo <46863685+fabianocattaneo@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:33:15 +0200 Subject: [PATCH 1/6] Added function to check if any room has a BNS device --- src/pyatmo/home.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pyatmo/home.py b/src/pyatmo/home.py index 0c593969..af58cfe3 100644 --- a/src/pyatmo/home.py +++ b/src/pyatmo/home.py @@ -175,6 +175,11 @@ def has_otm(self) -> bool: return any("OTM" in room.device_types for room in self.rooms.values()) + def has_bns(self) -> bool: + """Check if any room has a BNS device.""" + + return any("BNS" in room.device_types for room in self.rooms.values()) + def get_hg_temp(self) -> float | None: """Return frost guard temperature value for given home.""" From 6e46b16ba2c8bef0a5ee69380e837f4c4dc79b72 Mon Sep 17 00:00:00 2001 From: Fabiano Cattaneo <46863685+fabianocattaneo@users.noreply.github.com> Date: Thu, 25 Apr 2024 18:25:57 +0200 Subject: [PATCH 2/6] Use _async_therm_set instead if home has a BNS Use _async_therm_set instead of _async_set_thermpoint if the home has a BNS (Smarther with Netatmo thermostat) --- src/pyatmo/room.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyatmo/room.py b/src/pyatmo/room.py index f6229081..2f1b1964 100644 --- a/src/pyatmo/room.py +++ b/src/pyatmo/room.py @@ -128,7 +128,7 @@ async def async_therm_set( mode = MODE_MAP.get(mode, mode) if "NATherm1" in self.device_types or ( - "NRV" in self.device_types and not self.home.has_otm() + "NRV" in self.device_types and not self.home.has_otm() and not self.home.has_bns() ): await self._async_set_thermpoint(mode, temp, end_time) From b8b64b353f4febaf0f5116b663e27e1f56e916d3 Mon Sep 17 00:00:00 2001 From: Tobias Sauerwein Date: Sun, 18 Aug 2024 23:49:51 +0200 Subject: [PATCH 3/6] Update src/pyatmo/home.py --- src/pyatmo/home.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyatmo/home.py b/src/pyatmo/home.py index af58cfe3..3df6a984 100644 --- a/src/pyatmo/home.py +++ b/src/pyatmo/home.py @@ -176,7 +176,7 @@ def has_otm(self) -> bool: return any("OTM" in room.device_types for room in self.rooms.values()) def has_bns(self) -> bool: - """Check if any room has a BNS device.""" + """Check if any room has BNS device.""" return any("BNS" in room.device_types for room in self.rooms.values()) From 9c5946c8b73612a86b43651aae2dbf44da69f0cc Mon Sep 17 00:00:00 2001 From: Tobias Sauerwein Date: Sun, 18 Aug 2024 23:50:16 +0200 Subject: [PATCH 4/6] Update src/pyatmo/home.py --- src/pyatmo/home.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyatmo/home.py b/src/pyatmo/home.py index 3df6a984..af58cfe3 100644 --- a/src/pyatmo/home.py +++ b/src/pyatmo/home.py @@ -176,7 +176,7 @@ def has_otm(self) -> bool: return any("OTM" in room.device_types for room in self.rooms.values()) def has_bns(self) -> bool: - """Check if any room has BNS device.""" + """Check if any room has a BNS device.""" return any("BNS" in room.device_types for room in self.rooms.values()) From 73cbc1f9eca6b59988cb70014ce3ebddd71bf0f4 Mon Sep 17 00:00:00 2001 From: Tobias Sauerwein Date: Sun, 18 Aug 2024 23:52:54 +0200 Subject: [PATCH 5/6] Update src/pyatmo/room.py --- src/pyatmo/room.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pyatmo/room.py b/src/pyatmo/room.py index 2f1b1964..a412f3df 100644 --- a/src/pyatmo/room.py +++ b/src/pyatmo/room.py @@ -128,7 +128,9 @@ async def async_therm_set( mode = MODE_MAP.get(mode, mode) if "NATherm1" in self.device_types or ( - "NRV" in self.device_types and not self.home.has_otm() and not self.home.has_bns() + "NRV" in self.device_types + and not self.home.has_otm() + and not self.home.has_bns() ): await self._async_set_thermpoint(mode, temp, end_time) From 858d8c2dc614482723734fa91afb5a85b7a8d759 Mon Sep 17 00:00:00 2001 From: Tobias Sauerwein Date: Sun, 18 Aug 2024 23:54:42 +0200 Subject: [PATCH 6/6] Update src/pyatmo/room.py --- src/pyatmo/room.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyatmo/room.py b/src/pyatmo/room.py index a412f3df..1604c61e 100644 --- a/src/pyatmo/room.py +++ b/src/pyatmo/room.py @@ -128,8 +128,8 @@ async def async_therm_set( mode = MODE_MAP.get(mode, mode) if "NATherm1" in self.device_types or ( - "NRV" in self.device_types - and not self.home.has_otm() + "NRV" in self.device_types + and not self.home.has_otm() and not self.home.has_bns() ): await self._async_set_thermpoint(mode, temp, end_time)