Skip to content

Commit

Permalink
Add Sauter and Thermor servers (alias for Atlantic CozyTouch) (#1358)
Browse files Browse the repository at this point in the history
* Add Sauter and Thermor aliases

* Add new Atlantic servers

* fix formatting
  • Loading branch information
iMicknl authored Sep 6, 2024
1 parent f930f3c commit 4e8726c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyoverkiz/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
12 changes: 12 additions & 0 deletions pyoverkiz/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand All @@ -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/",
Expand Down
2 changes: 2 additions & 0 deletions pyoverkiz/enums/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 4e8726c

Please sign in to comment.