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.
Files changed (26) hide show
  1. {hatch_rest_api-1.26.2/src/hatch_rest_api.egg-info → hatch_rest_api-1.26.4}/PKG-INFO +3 -2
  2. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/pyproject.toml +1 -1
  3. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/stub.py +1 -1
  4. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/util_bootstrap.py +4 -0
  5. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4/src/hatch_rest_api.egg-info}/PKG-INFO +3 -2
  6. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/LICENSE +0 -0
  7. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/README.md +0 -0
  8. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/setup.cfg +0 -0
  9. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/__init__.py +0 -0
  10. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/aws_http.py +0 -0
  11. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/callbacks.py +0 -0
  12. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/const.py +0 -0
  13. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/errors.py +0 -0
  14. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/hatch.py +0 -0
  15. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/rest_iot.py +0 -0
  16. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/rest_mini.py +0 -0
  17. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/rest_plus.py +0 -0
  18. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/restore_iot.py +0 -0
  19. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/shadow_client_subscriber.py +0 -0
  20. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/types.py +0 -0
  21. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/util.py +0 -0
  22. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api/util_http.py +0 -0
  23. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/SOURCES.txt +0 -0
  24. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/dependency_links.txt +0 -0
  25. {hatch_rest_api-1.26.2 → hatch_rest_api-1.26.4}/src/hatch_rest_api.egg-info/requires.txt +0 -0
  26. {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
1
+ Metadata-Version: 2.4
2
2
  Name: hatch_rest_api
3
- Version: 1.26.2
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]
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
9
9
 
10
10
  [project]
11
11
  name = "hatch_rest_api"
12
- version = "1.26.2"
12
+ version = "1.26.4"
13
13
  authors = [
14
14
  { name="Brendan Dahl", email="dahl.brendan@gmail.com" },
15
15
  ]
@@ -37,7 +37,7 @@ async def testing():
37
37
 
38
38
  iot_device.register_callback(output)
39
39
 
40
- await asyncio.sleep(60)
40
+ await asyncio.sleep(600)
41
41
  finally:
42
42
  if mqtt_connection:
43
43
  disconnect = await loop.run_in_executor(None, mqtt_connection.disconnect)
@@ -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
1
+ Metadata-Version: 2.4
2
2
  Name: hatch_rest_api
3
- Version: 1.26.2
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