wyzeapy 0.5.22.post1__py3-none-any.whl → 0.5.23__py3-none-any.whl

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.
wyzeapy/utils.py CHANGED
@@ -105,12 +105,9 @@ def check_for_errors_iot(service, response_json: Dict[Any, Any]) -> None:
105
105
  raise UnknownApiError(response_json)
106
106
 
107
107
  def check_for_errors_hms(service, response_json: Dict[Any, Any]) -> None:
108
- if response_json['code'] != 1:
109
- if str(response_json['code']) == ResponseCodes.ACCESS_TOKEN_ERROR.value:
110
- service._auth_lib.token.expired = True
111
- raise AccessTokenError("Access Token expired, attempting to refresh")
112
- else:
113
- raise UnknownApiError(response_json)
108
+ if response_json['message'] is None:
109
+ service._auth_lib.token.expired = True
110
+ raise AccessTokenError("Access Token expired, attempting to refresh")
114
111
 
115
112
 
116
113
  def return_event_for_device(device: Device, events: List[Event]) -> Optional[Event]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wyzeapy
3
- Version: 0.5.22.post1
3
+ Version: 0.5.23
4
4
  Summary: A library for interacting with Wyze devices
5
5
  License: GPL-3.0-only
6
6
  Author: Katie Mulliken
@@ -15,9 +15,9 @@ wyzeapy/services/thermostat_service.py,sha256=3yJ8Jx7WPROTkiD2868QrfALFR1QB6_JI4
15
15
  wyzeapy/services/update_manager.py,sha256=036ClmJMFzXjD03mfg5DIyjB3xwqHoWkmpU2tcquc5Q,6132
16
16
  wyzeapy/services/wall_switch_service.py,sha256=1PmDyKh6WR8ZVVHsj9CAiIDOyG18D0wmH64U2XluT5I,4315
17
17
  wyzeapy/types.py,sha256=rUjW2n21ArbxxRpFQGZ5pUIt4bb6JJAkTXElSFHXLiU,5828
18
- wyzeapy/utils.py,sha256=yKbZljDi__B745N3mo2RdYRSKUsw_IsW8cX1kcitbPw,4413
18
+ wyzeapy/utils.py,sha256=t2rktlOBXJ5O8YDwVkDwbEpBCwNA7TpiwVVeiDdpzu8,4267
19
19
  wyzeapy/wyze_auth_lib.py,sha256=NWlWEMMNeEuCYLo7rxWd1EpJWPsP3huhJatfKTCkKm0,12713
20
- wyzeapy-0.5.22.post1.dist-info/LICENSES/GPL-3.0-only.txt,sha256=tqi_Y64slbCqJW7ndGgNe9GPIfRX2nVGb3YQs7FqzE4,34670
21
- wyzeapy-0.5.22.post1.dist-info/METADATA,sha256=zlpAY0QmjikGMu-hrXIwlAxRwIzmc6VtTETMlGLOS1A,563
22
- wyzeapy-0.5.22.post1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
23
- wyzeapy-0.5.22.post1.dist-info/RECORD,,
20
+ wyzeapy-0.5.23.dist-info/LICENSES/GPL-3.0-only.txt,sha256=tqi_Y64slbCqJW7ndGgNe9GPIfRX2nVGb3YQs7FqzE4,34670
21
+ wyzeapy-0.5.23.dist-info/METADATA,sha256=0kXEypIc1o-__Yrfu0yj-MI_5-dUvGAUq5GxOWFy-5o,557
22
+ wyzeapy-0.5.23.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
23
+ wyzeapy-0.5.23.dist-info/RECORD,,