pyvera 0.3.14__py3-none-any.whl → 0.3.16__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.
pyvera/__init__.py
CHANGED
@@ -1060,7 +1060,7 @@ class VeraLock(VeraDevice):
|
|
1060
1060
|
def set_new_pin(self, name: str, pin: int) -> requests.Response:
|
1061
1061
|
"""Set the lock state, also update local state."""
|
1062
1062
|
return self.set_door_code_values(
|
1063
|
-
self.lock_service, "SetPin", {"UserCodeName": name, "
|
1063
|
+
self.lock_service, "SetPin", {"UserCodeName": name, "newPin": pin}
|
1064
1064
|
)
|
1065
1065
|
|
1066
1066
|
def clear_slot_pin(self, slot: int) -> requests.Response:
|
@@ -1227,7 +1227,6 @@ class VeraLock(VeraDevice):
|
|
1227
1227
|
# Loop to create a list of codes
|
1228
1228
|
codes = []
|
1229
1229
|
for code in raw_code_list:
|
1230
|
-
|
1231
1230
|
try:
|
1232
1231
|
# Strip off trailing semicolon
|
1233
1232
|
# Create a list from csv
|
@@ -1259,17 +1258,17 @@ class VeraThermostat(VeraDevice):
|
|
1259
1258
|
"""Set current goal temperature / setpoint."""
|
1260
1259
|
|
1261
1260
|
self.set_service_value(
|
1262
|
-
self.
|
1261
|
+
self._thermostat_setpoint, "CurrentSetpoint", "NewCurrentSetpoint", temp
|
1263
1262
|
)
|
1264
1263
|
|
1265
|
-
self.set_cache_value(
|
1264
|
+
self.set_cache_value(self._setpoint_cache_value_name, temp)
|
1266
1265
|
|
1267
1266
|
def get_current_goal_temperature(self, refresh: bool = False) -> Optional[float]:
|
1268
1267
|
"""Get current goal temperature / setpoint."""
|
1269
1268
|
if refresh:
|
1270
1269
|
self.refresh()
|
1271
1270
|
try:
|
1272
|
-
return float(self.get_value(
|
1271
|
+
return float(self.get_value(self._setpoint_cache_value_name))
|
1273
1272
|
except (TypeError, ValueError):
|
1274
1273
|
return None
|
1275
1274
|
|
@@ -1344,6 +1343,54 @@ class VeraThermostat(VeraDevice):
|
|
1344
1343
|
"""Set fan to cycle."""
|
1345
1344
|
self.set_fan_mode("PeriodicOn")
|
1346
1345
|
|
1346
|
+
def _has_double_setpoints(self) -> bool:
|
1347
|
+
"""Determines if a thermostate has two setpoints"""
|
1348
|
+
if self.get_value("setpoint"):
|
1349
|
+
return False
|
1350
|
+
|
1351
|
+
if self.get_value("heatsp") and self.get_value("coolsp"):
|
1352
|
+
return True
|
1353
|
+
|
1354
|
+
return False
|
1355
|
+
|
1356
|
+
def _is_heating_recommended(self) -> bool:
|
1357
|
+
mode = self.get_value("mode")
|
1358
|
+
state = self.get_value("hvacstate")
|
1359
|
+
|
1360
|
+
if mode == "HeatOn":
|
1361
|
+
return True
|
1362
|
+
|
1363
|
+
if mode == "CoolOn":
|
1364
|
+
return False
|
1365
|
+
|
1366
|
+
if state == "Heating":
|
1367
|
+
return True
|
1368
|
+
|
1369
|
+
if state == "Cooling":
|
1370
|
+
return False
|
1371
|
+
|
1372
|
+
return True
|
1373
|
+
|
1374
|
+
@property
|
1375
|
+
def _setpoint_cache_value_name(self) -> str:
|
1376
|
+
if self._has_double_setpoints():
|
1377
|
+
if self._is_heating_recommended():
|
1378
|
+
return "heatsp"
|
1379
|
+
else:
|
1380
|
+
return "coolsp"
|
1381
|
+
else:
|
1382
|
+
return "setpoint"
|
1383
|
+
|
1384
|
+
@property
|
1385
|
+
def _thermostat_setpoint(self) -> str:
|
1386
|
+
if self._has_double_setpoints():
|
1387
|
+
if self._is_heating_recommended():
|
1388
|
+
return self.thermostat_heat_setpoint
|
1389
|
+
else:
|
1390
|
+
return self.thermostat_cool_setpoint
|
1391
|
+
else:
|
1392
|
+
return self.thermostat_setpoint
|
1393
|
+
|
1347
1394
|
|
1348
1395
|
class VeraSceneController(VeraDevice):
|
1349
1396
|
"""Class to represent a scene controller."""
|
@@ -1,24 +1,26 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyvera
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.16
|
4
4
|
Summary: Python API for talking to Veracontrollers
|
5
|
-
Home-page: https://github.com/
|
5
|
+
Home-page: https://github.com/maximvelichko/pyvera
|
6
6
|
License: GPL2
|
7
7
|
Keywords: vera,api
|
8
8
|
Author: James Cole
|
9
|
-
Requires-Python: >=3.
|
9
|
+
Requires-Python: >=3.8,<4.0
|
10
|
+
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
10
11
|
Classifier: License :: Other/Proprietary License
|
11
12
|
Classifier: Programming Language :: Python :: 3
|
12
|
-
Classifier: Programming Language :: Python :: 3.5
|
13
|
-
Classifier: Programming Language :: Python :: 3.6
|
14
|
-
Classifier: Programming Language :: Python :: 3.7
|
15
13
|
Classifier: Programming Language :: Python :: 3.8
|
16
14
|
Classifier: Programming Language :: Python :: 3.9
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
17
19
|
Requires-Dist: requests (>=2.22.0)
|
18
|
-
Project-URL: Repository, https://github.com/
|
20
|
+
Project-URL: Repository, https://github.com/maximvelichko/pyvera
|
19
21
|
Description-Content-Type: text/markdown
|
20
22
|
|
21
|
-
# pyVera   
|
22
24
|
|
23
25
|
A simple Python library to control devices via the Vera controller (http://getvera.com/).
|
24
26
|
|
@@ -70,14 +72,19 @@ If you have locks - this will show you information about them.
|
|
70
72
|
$ ./examples/show_lock_info.py -u http://192.168.1.161:3480/
|
71
73
|
~~~~
|
72
74
|
|
73
|
-
|
75
|
+
View existing locks and PINs:
|
74
76
|
~~~~
|
75
|
-
$ ./examples/
|
77
|
+
$ ./examples/show_lock_info.py -u http://192.168.1.161:3480/
|
78
|
+
~~~~
|
79
|
+
|
80
|
+
Set a new door lock code on device 335:
|
81
|
+
~~~~
|
82
|
+
$ ./examples/set_door_code.py -u http://192.168.1.161:3480/ -i 335 -n "John Doe" -p "5678"
|
76
83
|
~~~~
|
77
84
|
|
78
|
-
Clear a existing door lock code
|
85
|
+
Clear a existing door lock code from device 335:
|
79
86
|
~~~~
|
80
|
-
$ ./examples/delete_door_code.py -u http://192.168.1.161:3480/ -n "John Doe"
|
87
|
+
$ ./examples/delete_door_code.py -u http://192.168.1.161:3480/ -i 335 -n "John Doe"
|
81
88
|
~~~~
|
82
89
|
|
83
90
|
Debugging
|
@@ -0,0 +1,5 @@
|
|
1
|
+
pyvera/__init__.py,sha256=WmSIoDdrx1l4IoBBwWz2JncXKH-kTX-n_vBTbnouKb0,62932
|
2
|
+
pyvera-0.3.16.dist-info/LICENSE,sha256=pF0LtXLteS7TRienJiGDSzupKqtuLMTgQwHe56co11M,18027
|
3
|
+
pyvera-0.3.16.dist-info/METADATA,sha256=QkjwVaF4mfzqylv2d2qdZmTKHyD_XMjENB5LRdjxYFA,3668
|
4
|
+
pyvera-0.3.16.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
5
|
+
pyvera-0.3.16.dist-info/RECORD,,
|
pyvera-0.3.14.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
pyvera/__init__.py,sha256=0kOPpbbKHt6bIbfszs0wfJn_RHEp1kxdA-G2cLlojWo,61625
|
2
|
-
pyvera-0.3.14.dist-info/LICENSE,sha256=pF0LtXLteS7TRienJiGDSzupKqtuLMTgQwHe56co11M,18027
|
3
|
-
pyvera-0.3.14.dist-info/WHEEL,sha256=xSvaL1DM8LOHfdyo0cCcwjZu1tC6CnCsRGWUgazvlbM,83
|
4
|
-
pyvera-0.3.14.dist-info/METADATA,sha256=mLQ_grIUqa1SZfta6rLLzm5qpsmOfgqajoDxsjoPloo,3386
|
5
|
-
pyvera-0.3.14.dist-info/RECORD,,
|
File without changes
|