|
4 | 4 |
|
5 | 5 | from aiohttp import ClientSession
|
6 | 6 |
|
7 |
| -from pyoverkiz.servers.atlantic_cozytouch import AtlanticCozytouch |
8 |
| -from pyoverkiz.servers.default import DefaultServer |
9 |
| -from pyoverkiz.servers.nexity import NexityServer |
10 |
| -from pyoverkiz.servers.overkiz_server import OverkizServer |
11 |
| -from pyoverkiz.servers.somfy import SomfyServer |
| 7 | +from pyoverkiz.clients.atlantic_cozytouch import AtlanticCozytouchClient |
| 8 | +from pyoverkiz.clients.default import DefaultClient |
| 9 | +from pyoverkiz.clients.nexity import NexityClient |
| 10 | +from pyoverkiz.clients.overkiz import OverkizClient |
| 11 | +from pyoverkiz.clients.somfy import SomfyClient |
12 | 12 |
|
13 |
| -SUPPORTED_SERVERS: dict[str, Callable[[ClientSession], OverkizServer]] = { |
14 |
| - "atlantic_cozytouch": lambda session: AtlanticCozytouch( |
| 13 | +SUPPORTED_SERVERS: dict[str, Callable[[ClientSession], OverkizClient]] = { |
| 14 | + "atlantic_cozytouch": lambda session: AtlanticCozytouchClient( |
15 | 15 | name="Atlantic Cozytouch",
|
16 | 16 | endpoint="https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
17 | 17 | manufacturer="Atlantic",
|
18 | 18 | configuration_url=None,
|
19 | 19 | session=session,
|
20 | 20 | ),
|
21 |
| - "brandt": lambda session: DefaultServer( |
| 21 | + "brandt": lambda session: DefaultClient( |
22 | 22 | name="Brandt Smart Control",
|
23 | 23 | endpoint="https://ha3-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
24 | 24 | manufacturer="Brandt",
|
25 | 25 | configuration_url=None,
|
26 | 26 | session=session,
|
27 | 27 | ),
|
28 |
| - "flexom": lambda session: DefaultServer( |
| 28 | + "flexom": lambda session: DefaultClient( |
29 | 29 | name="Flexom",
|
30 | 30 | endpoint="https://ha108-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
31 | 31 | manufacturer="Bouygues",
|
32 | 32 | configuration_url=None,
|
33 | 33 | session=session,
|
34 | 34 | ),
|
35 |
| - "hexaom_hexaconnect": lambda session: DefaultServer( |
| 35 | + "hexaom_hexaconnect": lambda session: DefaultClient( |
36 | 36 | name="Hexaom HexaConnect",
|
37 | 37 | endpoint="https://ha5-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
38 | 38 | manufacturer="Hexaom",
|
39 | 39 | configuration_url=None,
|
40 | 40 | session=session,
|
41 | 41 | ),
|
42 |
| - "hi_kumo_asia": lambda session: DefaultServer( |
| 42 | + "hi_kumo_asia": lambda session: DefaultClient( |
43 | 43 | name="Hitachi Hi Kumo (Asia)",
|
44 | 44 | endpoint="https://ha203-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
45 | 45 | manufacturer="Hitachi",
|
46 | 46 | configuration_url=None,
|
47 | 47 | session=session,
|
48 | 48 | ),
|
49 |
| - "hi_kumo_europe": lambda session: DefaultServer( |
| 49 | + "hi_kumo_europe": lambda session: DefaultClient( |
50 | 50 | name="Hitachi Hi Kumo (Europe)",
|
51 | 51 | endpoint="https://ha117-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
52 | 52 | manufacturer="Hitachi",
|
53 | 53 | configuration_url=None,
|
54 | 54 | session=session,
|
55 | 55 | ),
|
56 |
| - "hi_kumo_oceania": lambda session: DefaultServer( |
| 56 | + "hi_kumo_oceania": lambda session: DefaultClient( |
57 | 57 | name="Hitachi Hi Kumo (Oceania)",
|
58 | 58 | endpoint="https://ha203-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
59 | 59 | manufacturer="Hitachi",
|
60 | 60 | configuration_url=None,
|
61 | 61 | session=session,
|
62 | 62 | ),
|
63 |
| - "nexity": lambda session: NexityServer( |
| 63 | + "nexity": lambda session: NexityClient( |
64 | 64 | name="Nexity Eugénie",
|
65 | 65 | endpoint="https://ha106-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
66 | 66 | manufacturer="Nexity",
|
67 | 67 | configuration_url=None,
|
68 | 68 | session=session,
|
69 | 69 | ),
|
70 |
| - "rexel": lambda session: DefaultServer( |
| 70 | + "rexel": lambda session: DefaultClient( |
71 | 71 | name="Rexel Energeasy Connect",
|
72 | 72 | endpoint="https://ha112-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
73 | 73 | manufacturer="Rexel",
|
74 | 74 | configuration_url="https://utilisateur.energeasyconnect.com/user/#/zone/equipements",
|
75 | 75 | session=session,
|
76 | 76 | ),
|
77 |
| - "simu_livein2": lambda session: DefaultServer( # alias of https://tahomalink.com |
| 77 | + "simu_livein2": lambda session: DefaultClient( # alias of https://tahomalink.com |
78 | 78 | name="SIMU (LiveIn2)",
|
79 | 79 | endpoint="https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
80 | 80 | manufacturer="Somfy",
|
81 | 81 | configuration_url=None,
|
82 | 82 | session=session,
|
83 | 83 | ),
|
84 |
| - "somfy_europe": lambda session: SomfyServer( # alias of https://tahomalink.com |
| 84 | + "somfy_europe": lambda session: SomfyClient( # alias of https://tahomalink.com |
85 | 85 | name="Somfy (Europe)",
|
86 | 86 | endpoint="https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
87 | 87 | manufacturer="Somfy",
|
88 | 88 | configuration_url="https://www.tahomalink.com",
|
89 | 89 | session=session,
|
90 | 90 | ),
|
91 |
| - "somfy_america": lambda session: DefaultServer( |
| 91 | + "somfy_america": lambda session: DefaultClient( |
92 | 92 | name="Somfy (North America)",
|
93 | 93 | endpoint="https://ha401-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
94 | 94 | manufacturer="Somfy",
|
95 | 95 | configuration_url=None,
|
96 | 96 | session=session,
|
97 | 97 | ),
|
98 |
| - "somfy_oceania": lambda session: DefaultServer( |
| 98 | + "somfy_oceania": lambda session: DefaultClient( |
99 | 99 | name="Somfy (Oceania)",
|
100 | 100 | endpoint="https://ha201-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
101 | 101 | manufacturer="Somfy",
|
102 | 102 | configuration_url=None,
|
103 | 103 | session=session,
|
104 | 104 | ),
|
105 |
| - "ubiwizz": lambda session: DefaultServer( |
| 105 | + "ubiwizz": lambda session: DefaultClient( |
106 | 106 | name="Ubiwizz",
|
107 | 107 | endpoint="https://ha129-1.overkiz.com/enduser-mobile-web/enduserAPI/",
|
108 | 108 | manufacturer="Decelect",
|
|
0 commit comments