File tree Expand file tree Collapse file tree 5 files changed +19
-46
lines changed Expand file tree Collapse file tree 5 files changed +19
-46
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import backoff
11
11
import humps
12
+ from aiohttp import ClientSession , ServerDisconnectedError
12
13
13
- from pyoverkiz .const import (
14
- SOMFY_API ,
15
- SOMFY_CLIENT_ID ,
16
- SOMFY_CLIENT_SECRET ,
17
- SUPPORTED_SERVERS ,
18
- )
19
14
from pyoverkiz .exceptions import (
20
15
InvalidEventListenerIdException ,
21
16
NoRegisteredEventListenerException ,
22
17
NotAuthenticatedException ,
23
- SomfyBadCredentialsException ,
24
- SomfyServiceException ,
25
18
TooManyConcurrentRequestsException ,
26
19
TooManyExecutionsException ,
27
20
)
39
32
State ,
40
33
)
41
34
from pyoverkiz .obfuscate import obfuscate_sensitive_data
42
- from pyoverkiz .servers .overkiz_server import (
43
- ClientSession ,
44
- FormData ,
45
- OverkizServer ,
46
- ServerDisconnectedError ,
47
- )
35
+ from pyoverkiz .servers .overkiz_server import OverkizServer
48
36
from pyoverkiz .types import JSON
49
37
50
38
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
- from pyoverkiz .models import OverkizServer
4
-
5
- COZYTOUCH_ATLANTIC_API = "https://apis.groupe-atlantic.com"
6
- COZYTOUCH_CLIENT_ID = (
7
- "Q3RfMUpWeVRtSUxYOEllZkE3YVVOQmpGblpVYToyRWNORHpfZHkzNDJVSnFvMlo3cFNKTnZVdjBh"
8
- )
9
-
10
- NEXITY_API = "https://api.egn.prd.aws-nexity.fr"
11
- NEXITY_COGNITO_CLIENT_ID = "3mca95jd5ase5lfde65rerovok"
12
- NEXITY_COGNITO_USER_POOL = "eu-west-1_wj277ucoI"
13
- NEXITY_COGNITO_REGION = "eu-west-1"
14
-
15
- SOMFY_API = "https://accounts.somfy.com"
16
- SOMFY_CLIENT_ID = "0d8e920c-1478-11e7-a377-02dd59bd3041_1ewvaqmclfogo4kcsoo0c8k4kso884owg08sg8c40sk4go4ksg"
17
- SOMFY_CLIENT_SECRET = "12k73w1n540g8o4cokg0cw84cog840k84cwggscwg884004kgk"
3
+ from pyoverkiz .servers .overkiz_server import OverkizServer
18
4
19
5
SUPPORTED_SERVERS : dict [str , OverkizServer ] = {
20
6
"atlantic_cozytouch" : OverkizServer (
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
-
4
3
from aiohttp import FormData
5
- from pyoverkiz . const import COZYTOUCH_ATLANTIC_API , COZYTOUCH_CLIENT_ID
4
+
6
5
from pyoverkiz .exceptions import (
7
6
CozyTouchBadCredentialsException ,
8
7
CozyTouchServiceException ,
9
8
)
10
-
11
9
from pyoverkiz .servers .overkiz_server import OverkizServer
12
10
11
+ COZYTOUCH_ATLANTIC_API = "https://apis.groupe-atlantic.com"
12
+ COZYTOUCH_CLIENT_ID = (
13
+ "Q3RfMUpWeVRtSUxYOEllZkE3YVVOQmpGblpVYToyRWNORHpfZHkzNDJVSnFvMlo3cFNKTnZVdjBh"
14
+ )
15
+
13
16
14
17
class AtlanticCozytouch (OverkizServer ):
15
18
async def login (self , username : str , password : str ) -> bool :
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
3
import asyncio
4
-
5
4
from typing import cast
6
5
7
6
import boto3
8
-
9
7
from botocore .config import Config
10
8
from warrant_lite import WarrantLite
11
9
12
- from pyoverkiz .const import (
13
- NEXITY_API ,
14
- NEXITY_COGNITO_CLIENT_ID ,
15
- NEXITY_COGNITO_REGION ,
16
- NEXITY_COGNITO_USER_POOL ,
17
- )
18
- from pyoverkiz .exceptions import (
19
- NexityBadCredentialsException ,
20
- NexityServiceException ,
21
- )
22
-
10
+ from pyoverkiz .exceptions import NexityBadCredentialsException , NexityServiceException
23
11
from pyoverkiz .servers .overkiz_server import OverkizServer
24
12
13
+ NEXITY_API = "https://api.egn.prd.aws-nexity.fr"
14
+ NEXITY_COGNITO_CLIENT_ID = "3mca95jd5ase5lfde65rerovok"
15
+ NEXITY_COGNITO_USER_POOL = "eu-west-1_wj277ucoI"
16
+ NEXITY_COGNITO_REGION = "eu-west-1"
17
+
25
18
26
19
class NexityServer (OverkizServer ):
27
20
async def login (self , username : str , password : str ) -> bool :
Original file line number Diff line number Diff line change 5
5
6
6
from aiohttp import FormData
7
7
8
- from pyoverkiz .const import SOMFY_API , SOMFY_CLIENT_ID , SOMFY_CLIENT_SECRET
9
8
from pyoverkiz .exceptions import SomfyBadCredentialsException , SomfyServiceException
10
9
from pyoverkiz .servers .overkiz_server import OverkizServer
11
10
from pyoverkiz .types import JSON
12
11
12
+ SOMFY_API = "https://accounts.somfy.com"
13
+ SOMFY_CLIENT_ID = "0d8e920c-1478-11e7-a377-02dd59bd3041_1ewvaqmclfogo4kcsoo0c8k4kso884owg08sg8c40sk4go4ksg"
14
+ SOMFY_CLIENT_SECRET = "12k73w1n540g8o4cokg0cw84cog840k84cwggscwg884004kgk"
15
+
13
16
14
17
class SomfyServer (OverkizServer ):
15
18
You can’t perform that action at this time.
0 commit comments