pyControl4 1.3.0__py3-none-any.whl → 1.5.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/climate.py CHANGED
@@ -36,6 +36,14 @@ class C4Climate(C4Entity):
36
36
  """Returns a list of supported fan modes."""
37
37
  return await self.director.getItemVariableValue(self.item_id, "FAN_MODES_LIST")
38
38
 
39
+ async def getHoldMode(self):
40
+ """Returns the currently active hold mode."""
41
+ return await self.director.getItemVariableValue(self.item_id, "HOLD_MODE")
42
+
43
+ async def getHoldModes(self):
44
+ """Returns a list of supported hold modes."""
45
+ return await self.director.getItemVariableValue(self.item_id, "HOLD_MODES_LIST")
46
+
39
47
  # ------------------------
40
48
  # Setpoint Getters
41
49
  # ------------------------
@@ -44,10 +52,18 @@ class C4Climate(C4Entity):
44
52
  """Returns the cooling setpoint temperature in Fahrenheit."""
45
53
  return await self.director.getItemVariableValue(self.item_id, "COOL_SETPOINT_F")
46
54
 
55
+ async def getCoolSetpointC(self):
56
+ """Returns the cooling setpoint temperature in Celsius."""
57
+ return await self.director.getItemVariableValue(self.item_id, "COOL_SETPOINT_C")
58
+
47
59
  async def getHeatSetpointF(self):
48
60
  """Returns the heating setpoint temperature in Fahrenheit."""
49
61
  return await self.director.getItemVariableValue(self.item_id, "HEAT_SETPOINT_F")
50
62
 
63
+ async def getHeatSetpointC(self):
64
+ """Returns the heating setpoint temperature in Celsius."""
65
+ return await self.director.getItemVariableValue(self.item_id, "HEAT_SETPOINT_C")
66
+
51
67
  # ------------------------
52
68
  # Sensor Readings
53
69
  # ------------------------
@@ -56,19 +72,19 @@ class C4Climate(C4Entity):
56
72
  """Returns the current humidity percentage."""
57
73
  return await self.director.getItemVariableValue(self.item_id, "HUMIDITY")
58
74
 
59
- async def getCurrentTemperature(self):
75
+ async def getCurrentTemperatureF(self):
60
76
  """Returns the current ambient temperature in Fahrenheit."""
61
77
  return await self.director.getItemVariableValue(self.item_id, "TEMPERATURE_F")
62
78
 
79
+ async def getCurrentTemperatureC(self):
80
+ """Returns the current ambient temperature in Celsius."""
81
+ return await self.director.getItemVariableValue(self.item_id, "TEMPERATURE_C")
82
+
63
83
  # ------------------------
64
84
  # Setters / Commands
65
85
  # ------------------------
66
86
 
67
- async def setTemperature(self, temp):
68
- """Sets the cooling setpoint temperature in Fahrenheit."""
69
- await self.setCoolSetpoint(temp) # Delegates to the proper method
70
-
71
- async def setCoolSetpoint(self, temp):
87
+ async def setCoolSetpointF(self, temp):
72
88
  """Sets the cooling setpoint temperature in Fahrenheit."""
73
89
  await self.director.sendPostRequest(
74
90
  f"/api/v1/items/{self.item_id}/commands",
@@ -76,7 +92,15 @@ class C4Climate(C4Entity):
76
92
  {"FAHRENHEIT": temp},
77
93
  )
78
94
 
79
- async def setHeatSetpoint(self, temp):
95
+ async def setCoolSetpointC(self, temp):
96
+ """Sets the cooling setpoint temperature in Celsius."""
97
+ await self.director.sendPostRequest(
98
+ f"/api/v1/items/{self.item_id}/commands",
99
+ "SET_SETPOINT_COOL",
100
+ {"CELSIUS": temp},
101
+ )
102
+
103
+ async def setHeatSetpointF(self, temp):
80
104
  """Sets the heating setpoint temperature in Fahrenheit."""
81
105
  await self.director.sendPostRequest(
82
106
  f"/api/v1/items/{self.item_id}/commands",
@@ -84,6 +108,14 @@ class C4Climate(C4Entity):
84
108
  {"FAHRENHEIT": temp},
85
109
  )
86
110
 
111
+ async def setHeatSetpointC(self, temp):
112
+ """Sets the heating setpoint temperature in Celsius."""
113
+ await self.director.sendPostRequest(
114
+ f"/api/v1/items/{self.item_id}/commands",
115
+ "SET_SETPOINT_HEAT",
116
+ {"CELSIUS": temp},
117
+ )
118
+
87
119
  async def setHvacMode(self, mode):
88
120
  """Sets the HVAC operating mode (e.g., heat, cool, auto)."""
89
121
  await self.director.sendPostRequest(
@@ -107,3 +139,11 @@ class C4Climate(C4Entity):
107
139
  "SET_PRESET",
108
140
  {"NAME": preset},
109
141
  )
142
+
143
+ async def setHoldMode(self, mode):
144
+ """Sets the hold mode."""
145
+ await self.director.sendPostRequest(
146
+ f"/api/v1/items/{self.item_id}/commands",
147
+ "SET_MODE_HOLD",
148
+ {"MODE": mode},
149
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyControl4
3
- Version: 1.3.0
3
+ Version: 1.5.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
@@ -2,7 +2,7 @@ pyControl4/__init__.py,sha256=JR6zFcZJ-M1o8g28gdU71uZHYzh-b21x7rg3EWrf3hg,394
2
2
  pyControl4/account.py,sha256=eyWkGaDla4_gLvv8GHBxmJ2iBMxpdY7ax53JryWOtcE,9760
3
3
  pyControl4/alarm.py,sha256=KcZreUOocncgoIoRVHl9ZL1zesrXuVYPfXVvDuUpXcs,7153
4
4
  pyControl4/blind.py,sha256=7Aat1FyT-OJyv_xES-ol2U-70nKpQbymGUfTTsB3VDk,4436
5
- pyControl4/climate.py,sha256=QsTJbp5vYNpfphGFqQBVV5FTsTja5mJtzxz4pIIkFWc,3963
5
+ pyControl4/climate.py,sha256=G-7f2n_G25Fj9vlYDbb_xIfvuh7DawDeYTIq2HzRhVA,5522
6
6
  pyControl4/director.py,sha256=QY6Re-fGgV-V340rTjpkSCfqvVRD_kbnDEHScoGJ0gk,10718
7
7
  pyControl4/error_handling.py,sha256=3VpZ4JsF5kgrSNASHYVEQVIJq_vs8kvMk0-bDsd_FXU,3866
8
8
  pyControl4/fan.py,sha256=MldA1E5VDkLJrS2Zp-5tUBEgPsUGYH7D6J-i2OdFJ5I,2140
@@ -10,8 +10,8 @@ pyControl4/light.py,sha256=qc8AGFiM9wnS-gi1tecWGGBRo-9dPZzYBHvE0QenW8w,1587
10
10
  pyControl4/relay.py,sha256=GWYxdaB9sG3ixD87IY2yV3UKulIB7mkq1xyjxtUDW1Q,2225
11
11
  pyControl4/room.py,sha256=nGhVxTw1QjX3UFmFZEO8TYBPCUae-NqObuVTPShEkqs,5195
12
12
  pyControl4/websocket.py,sha256=9UsxO8tFUENuya1tzwTYk2haWnnDutUgQ5jTLTlr5dU,8823
13
- pycontrol4-1.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
- pycontrol4-1.3.0.dist-info/METADATA,sha256=WEAbFu5iVvjZ-iKRNG2u2BYlNDPytORQ4dX1Zpm_hmU,3285
15
- pycontrol4-1.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- pycontrol4-1.3.0.dist-info/top_level.txt,sha256=8hJWE4Vz6ySUM1pzgZQCyngE7zVDW8qp7qe_4JXKRpY,11
17
- pycontrol4-1.3.0.dist-info/RECORD,,
13
+ pycontrol4-1.5.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
+ pycontrol4-1.5.0.dist-info/METADATA,sha256=QGW5Lm8SD28d004oAeK6kGuPCZbZ9qQZmPV4629gdTs,3285
15
+ pycontrol4-1.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ pycontrol4-1.5.0.dist-info/top_level.txt,sha256=8hJWE4Vz6ySUM1pzgZQCyngE7zVDW8qp7qe_4JXKRpY,11
17
+ pycontrol4-1.5.0.dist-info/RECORD,,