From 4e8726caf989c5961ac1c22b8b2a8c67207d49a2 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Fri, 6 Sep 2024 21:13:37 +0200 Subject: [PATCH] Add Sauter and Thermor servers (alias for Atlantic CozyTouch) (#1358) * Add Sauter and Thermor aliases * Add new Atlantic servers * fix formatting --- pyoverkiz/client.py | 6 +++++- pyoverkiz/const.py | 12 ++++++++++++ pyoverkiz/enums/server.py | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pyoverkiz/client.py b/pyoverkiz/client.py index 9929af2f..89923cb5 100644 --- a/pyoverkiz/client.py +++ b/pyoverkiz/client.py @@ -208,7 +208,11 @@ async def login( return True # CozyTouch authentication using jwt - if self.server == SUPPORTED_SERVERS[Server.ATLANTIC_COZYTOUCH]: + if self.server in [ + SUPPORTED_SERVERS[Server.ATLANTIC_COZYTOUCH], + SUPPORTED_SERVERS[Server.THERMOR_COZYTOUCH], + SUPPORTED_SERVERS[Server.SAUTER_COZYTOUCH], + ]: jwt = await self.cozytouch_login() payload = {"jwt": jwt} diff --git a/pyoverkiz/const.py b/pyoverkiz/const.py index c318c573..e9602f7c 100644 --- a/pyoverkiz/const.py +++ b/pyoverkiz/const.py @@ -80,6 +80,12 @@ manufacturer="Rexel", configuration_url="https://utilisateur.energeasyconnect.com/user/#/zone/equipements", ), + Server.SAUTER_COZYTOUCH: OverkizServer( # duplicate of Atlantic Cozytouch + name="Sauter Cozytouch", + endpoint="https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/", + manufacturer="Sauter", + configuration_url=None, + ), Server.SIMU_LIVEIN2: OverkizServer( # alias of https://tahomalink.com name="SIMU (LiveIn2)", endpoint="https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/", @@ -104,6 +110,12 @@ manufacturer="Somfy", configuration_url=None, ), + Server.THERMOR_COZYTOUCH: OverkizServer( # duplicate of Atlantic Cozytouch + name="Thermor Cozytouch", + endpoint="https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/", + manufacturer="Thermor", + configuration_url=None, + ), Server.UBIWIZZ: OverkizServer( name="Ubiwizz", endpoint="https://ha129-1.overkiz.com/enduser-mobile-web/enduserAPI/", diff --git a/pyoverkiz/enums/server.py b/pyoverkiz/enums/server.py index df6ae2cf..b266a58d 100644 --- a/pyoverkiz/enums/server.py +++ b/pyoverkiz/enums/server.py @@ -26,9 +26,11 @@ class Server(StrEnum): HI_KUMO_OCEANIA = "hi_kumo_oceania" NEXITY = "nexity" REXEL = "rexel" + SAUTER_COZYTOUCH = "sauter_cozytouch" SIMU_LIVEIN2 = "simu_livein2" SOMFY_DEVELOPER_MODE = "somfy_developer_mode" SOMFY_EUROPE = "somfy_europe" SOMFY_AMERICA = "somfy_america" SOMFY_OCEANIA = "somfy_oceania" + THERMOR_COZYTOUCH = "thermor_cozytouch" UBIWIZZ = "ubiwizz"