pyControl4 1.1.1__py3-none-any.whl → 1.2.0__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.
pyControl4/account.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """Authenticates with the Control4 API, retrieves account and registered
2
2
  controller info, and retrieves a bearer token for connecting to a Control4 Director.
3
3
  """
4
+
4
5
  import aiohttp
5
6
  import async_timeout
6
7
  import json
pyControl4/alarm.py CHANGED
@@ -1,5 +1,6 @@
1
1
  """Controls Control4 security panel and contact sensor (door, window, motion) devices.
2
2
  """
3
+
3
4
  import json
4
5
  from pyControl4 import C4Entity
5
6
 
pyControl4/blind.py CHANGED
@@ -1,7 +1,6 @@
1
1
  """Controls Control4 blind devices.
2
2
  """
3
3
 
4
-
5
4
  from pyControl4 import C4Entity
6
5
 
7
6
 
pyControl4/director.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """Handles communication with a Control4 Director, and provides functions for
2
2
  getting details about items on the Director.
3
3
  """
4
+
4
5
  import aiohttp
5
6
  import async_timeout
6
7
  import json
@@ -1,4 +1,5 @@
1
1
  """Handles errors recieved from the Control4 API."""
2
+
2
3
  import json
3
4
  import xmltodict
4
5
 
@@ -28,15 +29,18 @@ class BadToken(Unauthorized):
28
29
  """Raised when director bearer token is invalid."""
29
30
 
30
31
 
32
+ class InvalidCategory(C4Exception):
33
+ """Raised when an invalid category is provided when calling
34
+ `pyControl4.director.C4Director.getAllItemsByCategory`."""
35
+
36
+
31
37
  ERROR_CODES = {"401": Unauthorized, "404": NotFound}
32
38
 
33
39
  ERROR_DETAILS = {
34
40
  "Permission denied Bad credentials": BadCredentials,
35
41
  }
36
42
 
37
- DIRECTOR_ERRORS = {
38
- "Unauthorized": Unauthorized,
39
- }
43
+ DIRECTOR_ERRORS = {"Unauthorized": Unauthorized, "Invalid category": InvalidCategory}
40
44
 
41
45
  DIRECTOR_ERROR_DETAILS = {"Expired or invalid token": BadToken}
42
46
 
pyControl4/light.py CHANGED
@@ -1,7 +1,6 @@
1
1
  """Controls Control4 Light devices.
2
2
  """
3
3
 
4
-
5
4
  from pyControl4 import C4Entity
6
5
 
7
6
 
pyControl4/relay.py CHANGED
@@ -1,7 +1,6 @@
1
1
  """Controls Control4 Relay devices. These can include locks, and potentially other types of devices.
2
2
  """
3
3
 
4
-
5
4
  from pyControl4 import C4Entity
6
5
 
7
6
 
pyControl4/room.py CHANGED
@@ -1,7 +1,6 @@
1
1
  """Controls Control4 Room devices.
2
2
  """
3
3
 
4
-
5
4
  from pyControl4 import C4Entity
6
5
 
7
6
 
pyControl4/websocket.py CHANGED
@@ -1,7 +1,8 @@
1
1
  """Handles Websocket connections to a Control4 Director, allowing for real-time updates using callbacks."""
2
+
2
3
  import aiohttp
3
4
  import async_timeout
4
- import socketio
5
+ import socketio_v4 as socketio
5
6
  import logging
6
7
 
7
8
  from .error_handling import checkResponseForError
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyControl4
3
- Version: 1.1.1
3
+ Version: 1.2.0
4
4
  Summary: Python 3 asyncio package for interacting with Control4 systems
5
5
  Home-page: https://github.com/lawtancool/pyControl4
6
6
  Author: lawtancool
@@ -13,7 +13,7 @@ Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: aiohttp
15
15
  Requires-Dist: xmltodict
16
- Requires-Dist: python-socketio <5,>=4
16
+ Requires-Dist: python-socketio-v4
17
17
  Requires-Dist: websocket-client
18
18
 
19
19
  # pyControl4
@@ -0,0 +1,15 @@
1
+ pyControl4/__init__.py,sha256=JR6zFcZJ-M1o8g28gdU71uZHYzh-b21x7rg3EWrf3hg,394
2
+ pyControl4/account.py,sha256=eyWkGaDla4_gLvv8GHBxmJ2iBMxpdY7ax53JryWOtcE,9760
3
+ pyControl4/alarm.py,sha256=NHsrdzILMRf9-PdRIQr-7kZnsupcmH1o1khM3-iY08M,7154
4
+ pyControl4/blind.py,sha256=lgiWMdw3xxPO2VZd-ozX6QMAnhdj5-Z07NGTF-Tj3Ao,4437
5
+ pyControl4/director.py,sha256=xu1AyG_4KNs7oZ5kJA-qopoKF6KOUlVdtpi7bldGMP0,10723
6
+ pyControl4/error_handling.py,sha256=3VpZ4JsF5kgrSNASHYVEQVIJq_vs8kvMk0-bDsd_FXU,3866
7
+ pyControl4/light.py,sha256=gShT4QWhudVEYRWB0AGQYh-53FMwhuyjD6zUVXM142I,1588
8
+ pyControl4/relay.py,sha256=O8dGVF2b2Gfi1623en9jDMPbUPESwavTt-AYdQhOIQ4,2226
9
+ pyControl4/room.py,sha256=OyKoCyMst00RWSgNy7yBX9rS-0d2MUNd8_hvpJ-rSvg,5196
10
+ pyControl4/websocket.py,sha256=9UsxO8tFUENuya1tzwTYk2haWnnDutUgQ5jTLTlr5dU,8823
11
+ pyControl4-1.2.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
+ pyControl4-1.2.0.dist-info/METADATA,sha256=agMc_4RJNgJfmk3o3ZoLSGA-9J2xySdLXXEvn3Fd4Nw,3066
13
+ pyControl4-1.2.0.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
14
+ pyControl4-1.2.0.dist-info/top_level.txt,sha256=8hJWE4Vz6ySUM1pzgZQCyngE7zVDW8qp7qe_4JXKRpY,11
15
+ pyControl4-1.2.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.3)
2
+ Generator: setuptools (74.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,15 +0,0 @@
1
- pyControl4/__init__.py,sha256=JR6zFcZJ-M1o8g28gdU71uZHYzh-b21x7rg3EWrf3hg,394
2
- pyControl4/account.py,sha256=dQH3V_0xB7fpYwKTNADguH-XNnQU5zcIqkW1LkB4PZg,9759
3
- pyControl4/alarm.py,sha256=lxYsoTqABFxV63RR2CkXApOP244xpVFx4cXWp4OekxM,7153
4
- pyControl4/blind.py,sha256=sWd8SFXbLa2J9Ji8O1UElyJ9UodHTMVTOV7waVV9tEc,4438
5
- pyControl4/director.py,sha256=VwBnneq7mxF3mbck8z7YGTN1nIPtqP604SO8CJq_xyc,10722
6
- pyControl4/error_handling.py,sha256=MTYNmRypNfMgIy6rCnFoxoGrEOnfKG-9WpRYmxVCDKc,3670
7
- pyControl4/light.py,sha256=xkUNqA6UprSUsHEwgGoWwjqCPpUlg9T6XJ2213h-Uew,1589
8
- pyControl4/relay.py,sha256=e5gFA_9qRKo_Kdw4q4l6hym7bMB4e_Dw9CHoOY_i-H8,2227
9
- pyControl4/room.py,sha256=KQAfrrCDjeipRYbtNVLwNC6F6-QkTFJ3gkmBC7b-FyY,5197
10
- pyControl4/websocket.py,sha256=n1tbRK6jnLxcUPN-QgfofJbFK5vD8duTwN3uI-LcjYk,8807
11
- pyControl4-1.1.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
- pyControl4-1.1.1.dist-info/METADATA,sha256=3nJh02dV5TR77PCLpzhYmQkkV0SEWchIC4VRgQhWse4,3070
13
- pyControl4-1.1.1.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
14
- pyControl4-1.1.1.dist-info/top_level.txt,sha256=8hJWE4Vz6ySUM1pzgZQCyngE7zVDW8qp7qe_4JXKRpY,11
15
- pyControl4-1.1.1.dist-info/RECORD,,