hatch-rest-api 1.26.2__tar.gz → 1.26.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hatch_rest_api-1.26.2/src/hatch_rest_api.egg-info → hatch_rest_api-1.26.4}/PKG-INFO +3 -2
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/pyproject.toml +1 -1
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/stub.py +1 -1
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/util_bootstrap.py +4 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4/src/hatch_rest_api.egg-info}/PKG-INFO +3 -2
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/LICENSE +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/README.md +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/setup.cfg +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/__init__.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/aws_http.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/callbacks.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/const.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/errors.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/hatch.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/rest_iot.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/rest_mini.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/rest_plus.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/restore_iot.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/shadow_client_subscriber.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/types.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/util.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/util_http.py +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/SOURCES.txt +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/dependency_links.txt +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/requires.txt +0 -0
- {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hatch_rest_api
|
|
3
|
-
Version: 1.26.
|
|
3
|
+
Version: 1.26.4
|
|
4
4
|
Summary: Hatch Rest mini Api Wrapper
|
|
5
5
|
Author-email: Brendan Dahl <dahl.brendan@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dahlb/hatch_rest_api
|
|
@@ -17,6 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: aiohttp>=3.8.1
|
|
19
19
|
Requires-Dist: awsiotsdk>=1.16.0
|
|
20
|
+
Dynamic: license-file
|
|
20
21
|
|
|
21
22
|
[![GitHub Release][releases-shield]][releases]
|
|
22
23
|
[![GitHub Activity][commits-shield]][commits]
|
|
@@ -10,6 +10,7 @@ from aiohttp import ClientSession
|
|
|
10
10
|
from uuid import uuid4
|
|
11
11
|
from re import sub, IGNORECASE
|
|
12
12
|
|
|
13
|
+
from . import BaseError
|
|
13
14
|
from .hatch import Hatch
|
|
14
15
|
from .aws_http import AwsHttp
|
|
15
16
|
from .rest_mini import RestMini
|
|
@@ -33,6 +34,8 @@ async def get_rest_devices(
|
|
|
33
34
|
api = Hatch(client_session=client_session)
|
|
34
35
|
token = await api.login(email=email, password=password)
|
|
35
36
|
iot_devices = await api.iot_devices(auth_token=token)
|
|
37
|
+
if len(iot_devices) == 0:
|
|
38
|
+
raise BaseError("No compatible devices found on this hatch account")
|
|
36
39
|
aws_token = await api.token(auth_token=token)
|
|
37
40
|
favorites_map = await _get_favorites_for_all_v2_devices(api, token, iot_devices)
|
|
38
41
|
routines_map = await _get_routines_for_all_v2_devices(api, token, iot_devices)
|
|
@@ -43,6 +46,7 @@ async def get_rest_devices(
|
|
|
43
46
|
identityId=aws_token["identityId"],
|
|
44
47
|
aws_token=aws_token["token"],
|
|
45
48
|
)
|
|
49
|
+
_LOGGER.debug(f"AWS credentials: {aws_credentials}")
|
|
46
50
|
credentials_provider = AwsCredentialsProvider.new_static(
|
|
47
51
|
aws_credentials["Credentials"]["AccessKeyId"],
|
|
48
52
|
aws_credentials["Credentials"]["SecretKey"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hatch_rest_api
|
|
3
|
-
Version: 1.26.
|
|
3
|
+
Version: 1.26.4
|
|
4
4
|
Summary: Hatch Rest mini Api Wrapper
|
|
5
5
|
Author-email: Brendan Dahl <dahl.brendan@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dahlb/hatch_rest_api
|
|
@@ -17,6 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: aiohttp>=3.8.1
|
|
19
19
|
Requires-Dist: awsiotsdk>=1.16.0
|
|
20
|
+
Dynamic: license-file
|
|
20
21
|
|
|
21
22
|
[![GitHub Release][releases-shield]][releases]
|
|
22
23
|
[![GitHub Activity][commits-shield]][commits]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/shadow_client_subscriber.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|