PyViCare 2.52.0__tar.gz → 2.53.0__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 (30) hide show
  1. {pyvicare-2.52.0 → pyvicare-2.53.0}/PKG-INFO +1 -1
  2. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareDevice.py +34 -1
  3. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareDeviceConfig.py +14 -0
  4. pyvicare-2.53.0/PyViCare/PyViCareFloorHeating.py +32 -0
  5. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareRadiatorActuator.py +12 -8
  6. pyvicare-2.53.0/PyViCare/PyViCareRepeater.py +6 -0
  7. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareRoomSensor.py +2 -6
  8. {pyvicare-2.52.0 → pyvicare-2.53.0}/pyproject.toml +2 -2
  9. {pyvicare-2.52.0 → pyvicare-2.53.0}/LICENSE +0 -0
  10. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/Feature.py +0 -0
  11. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCare.py +0 -0
  12. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareAbstractOAuthManager.py +0 -0
  13. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareBrowserOAuthManager.py +0 -0
  14. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareCachedService.py +0 -0
  15. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareElectricalEnergySystem.py +0 -0
  16. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareFuelCell.py +0 -0
  17. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareGateway.py +0 -0
  18. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareGazBoiler.py +0 -0
  19. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareHeatCurveCalculation.py +0 -0
  20. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareHeatPump.py +0 -0
  21. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareHeatingDevice.py +0 -0
  22. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareHybrid.py +0 -0
  23. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareOAuthManager.py +0 -0
  24. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareOilBoiler.py +0 -0
  25. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCarePelletsBoiler.py +0 -0
  26. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareService.py +0 -0
  27. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareUtils.py +0 -0
  28. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/PyViCareVentilationDevice.py +0 -0
  29. {pyvicare-2.52.0 → pyvicare-2.53.0}/PyViCare/__init__.py +0 -0
  30. {pyvicare-2.52.0 → pyvicare-2.53.0}/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyViCare
3
- Version: 2.52.0
3
+ Version: 2.53.0
4
4
  Summary: Library to communicate with the Viessmann ViCare API.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,7 +1,7 @@
1
1
  from typing import Any
2
2
 
3
3
  from PyViCare.PyViCareService import ViCareService
4
- from PyViCare.PyViCareUtils import PyViCareNotSupportedFeatureError, handleNotSupported
4
+ from PyViCare.PyViCareUtils import PyViCareNotSupportedFeatureError, handleAPICommandErrors, handleNotSupported
5
5
 
6
6
 
7
7
  class Device:
@@ -42,3 +42,36 @@ class Device:
42
42
  return self.service.getProperty(deviceType)["isEnabled"] and self.service.getProperty(deviceType)["properties"]["active"]["value"]
43
43
  except PyViCareNotSupportedFeatureError:
44
44
  return False
45
+
46
+
47
+ class ZigbeeDevice(Device):
48
+
49
+ @handleNotSupported
50
+ def getSerial(self) -> str:
51
+ return str(self.service.getProperty("device.zigbee.parent.id")["deviceId"])
52
+
53
+ @handleNotSupported
54
+ def getZigbeeParentID(self) -> str:
55
+ return str(self.service.getProperty("device.zigbee.parent.id")["properties"]["value"]["value"])
56
+
57
+ @handleNotSupported
58
+ def getZigbeeSignalStrength(self) -> int:
59
+ return int(self.service.getProperty("device.zigbee.lqi")["properties"]["strength"]["value"])
60
+
61
+ @handleNotSupported
62
+ def getName(self) -> str:
63
+ return str(self.service.getProperty("device.name")["properties"]["name"]["value"])
64
+
65
+ @handleAPICommandErrors
66
+ def setName(self, name: str) -> None:
67
+ self.service.setProperty("device.name", "setName", {'name': name})
68
+
69
+ @handleNotSupported
70
+ def getIdentification(self) -> bool:
71
+ return bool(self.service.getProperty("device.identification")["properties"]["triggered"]["value"])
72
+
73
+ class ZigbeeBatteryDevice(ZigbeeDevice):
74
+
75
+ @handleNotSupported
76
+ def getBatteryLevel(self) -> int:
77
+ return int(self.service.getProperty("device.power.battery")["properties"]["level"]["value"])
@@ -2,6 +2,7 @@ import json
2
2
  import logging
3
3
  import re
4
4
 
5
+ from PyViCare.PyViCareFloorHeating import FloorHeating, FloorHeatingChannel
5
6
  from PyViCare.PyViCareFuelCell import FuelCell
6
7
  from PyViCare.PyViCareGazBoiler import GazBoiler
7
8
  from PyViCare.PyViCareHeatingDevice import HeatingDevice
@@ -11,6 +12,7 @@ from PyViCare.PyViCareOilBoiler import OilBoiler
11
12
  from PyViCare.PyViCarePelletsBoiler import PelletsBoiler
12
13
  from PyViCare.PyViCareRadiatorActuator import RadiatorActuator
13
14
  from PyViCare.PyViCareRoomSensor import RoomSensor
15
+ from PyViCare.PyViCareRepeater import Repeater
14
16
  from PyViCare.PyViCareElectricalEnergySystem import ElectricalEnergySystem
15
17
  from PyViCare.PyViCareGateway import Gateway
16
18
  from PyViCare.PyViCareVentilationDevice import VentilationDevice
@@ -50,9 +52,18 @@ class PyViCareDeviceConfig:
50
52
  def asRadiatorActuator(self):
51
53
  return RadiatorActuator(self.service)
52
54
 
55
+ def asFloorHeating(self):
56
+ return FloorHeating(self.service)
57
+
58
+ def asFloorHeatingChannel(self):
59
+ return FloorHeatingChannel(self.service)
60
+
53
61
  def asRoomSensor(self):
54
62
  return RoomSensor(self.service)
55
63
 
64
+ def asRepeater(self):
65
+ return Repeater(self.service)
66
+
56
67
  def asElectricalEnergySystem(self):
57
68
  return ElectricalEnergySystem(self.service)
58
69
 
@@ -88,7 +99,10 @@ class PyViCareDeviceConfig:
88
99
  (self.asVentilation, r"E3_ViAir", ["type:ventilation;central"]),
89
100
  (self.asVentilation, r"E3_VitoPure", ["type:ventilation;purifier"]),
90
101
  (self.asRadiatorActuator, r"E3_RadiatorActuator", ["type:radiator"]),
102
+ (self.asFloorHeating, r"Smart_zigbee_fht_main|E3_FloorHeatingCircuitDistributorBox", ["type:fhtMain"]),
103
+ (self.asFloorHeatingChannel, r"Smart_zigbee_fht_channel", ["type:fhtChannel"]),
91
104
  (self.asRoomSensor, r"E3_RoomSensor", ["type:climateSensor"]),
105
+ (self.asRepeater, r"E3_Repeater", ["type:repeater"]),
92
106
  (self.asGateway, r"E3_TCU41_x04", ["type:gateway;TCU100"]),
93
107
  (self.asGateway, r"E3_TCU19_x05", ["type:gateway;TCU200"]),
94
108
  (self.asGateway, r"E3_TCU10_x07", ["type:gateway;TCU300"]),
@@ -0,0 +1,32 @@
1
+ from PyViCare.PyViCareDevice import ZigbeeDevice, Device
2
+ from PyViCare.PyViCareUtils import handleAPICommandErrors, handleNotSupported
3
+
4
+
5
+ class FloorHeating(ZigbeeDevice):
6
+
7
+ @handleNotSupported
8
+ def getSupplyTemperature(self) -> float:
9
+ return float(self.service.getProperty("fht.sensors.temperature.supply")["properties"]["value"]["value"])
10
+
11
+ @handleNotSupported
12
+ def getActiveMode(self) -> str:
13
+ return str(self.service.getProperty("fht.operating.modes.active")["properties"]["value"]["value"])
14
+
15
+
16
+ class FloorHeatingChannel(Device):
17
+
18
+ @handleNotSupported
19
+ def getSerial(self) -> str:
20
+ return str(self.service.getProperty("device.name")["deviceId"])
21
+
22
+ @handleNotSupported
23
+ def getName(self) -> str:
24
+ return str(self.service.getProperty("device.name")["properties"]["name"]["value"])
25
+
26
+ @handleAPICommandErrors
27
+ def setName(self, name: str) -> None:
28
+ self.service.setProperty("device.name", "setName", {'name': name})
29
+
30
+ @handleNotSupported
31
+ def getValvePosition(self) -> str:
32
+ return str(self.service.getProperty("fht.valve.state")["properties"]["status"]["value"])
@@ -1,20 +1,24 @@
1
- from PyViCare.PyViCareDevice import Device
1
+ from PyViCare.PyViCareDevice import ZigbeeBatteryDevice
2
2
  from PyViCare.PyViCareUtils import handleAPICommandErrors, handleNotSupported
3
3
 
4
4
 
5
- class RadiatorActuator(Device):
5
+ class RadiatorActuator(ZigbeeBatteryDevice):
6
6
 
7
7
  @handleNotSupported
8
- def getSerial(self):
9
- return self.service.getProperty("device.name")["deviceId"]
8
+ def getTemperature(self):
9
+ return self.service.getProperty("device.sensors.temperature")["properties"]["value"]["value"]
10
10
 
11
11
  @handleNotSupported
12
- def getBatteryLevel(self) -> int:
13
- return int(self.service.getProperty("device.power.battery")["properties"]["level"]["value"])
12
+ def getValvePosition(self) -> int:
13
+ return int(self.service.getProperty("trv.valve.position")["properties"]["position"]["value"])
14
14
 
15
15
  @handleNotSupported
16
- def getTemperature(self):
17
- return self.service.getProperty("device.sensors.temperature")["properties"]["value"]["value"]
16
+ def getChildLock(self) -> str:
17
+ return str(self.service.getProperty("trv.childLock")["properties"]["status"]["value"])
18
+
19
+ @handleNotSupported
20
+ def getMountingMode(self) -> bool:
21
+ return bool(self.service.getProperty("trv.mountingMode")["properties"]["active"]["value"])
18
22
 
19
23
  @handleNotSupported
20
24
  def getTargetTemperature(self):
@@ -0,0 +1,6 @@
1
+ from PyViCare.PyViCareDevice import ZigbeeDevice
2
+
3
+
4
+ class Repeater(ZigbeeDevice):
5
+
6
+ pass
@@ -1,17 +1,13 @@
1
- from PyViCare.PyViCareDevice import Device
1
+ from PyViCare.PyViCareDevice import ZigbeeBatteryDevice
2
2
  from PyViCare.PyViCareUtils import handleNotSupported
3
3
 
4
4
 
5
- class RoomSensor(Device):
5
+ class RoomSensor(ZigbeeBatteryDevice):
6
6
 
7
7
  @handleNotSupported
8
8
  def getSerial(self):
9
9
  return self.service.getProperty("device.sensors.temperature")["deviceId"]
10
10
 
11
- @handleNotSupported
12
- def getBatteryLevel(self) -> int:
13
- return int(self.service.getProperty("device.power.battery")["properties"]["level"]["value"])
14
-
15
11
  @handleNotSupported
16
12
  def getTemperature(self):
17
13
  return self.service.getProperty("device.sensors.temperature")["properties"]["value"]["value"]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "PyViCare"
3
- version = "2.52.0"
3
+ version = "2.53.0"
4
4
  description = "Library to communicate with the Viessmann ViCare API."
5
5
  authors = [
6
6
  "Simon Gillet <mail+pyvicare@gillet.ninja>"
@@ -52,7 +52,7 @@ mypy = "^1.11.2"
52
52
  pylint = "^3.2.6"
53
53
  pytest = "^8.3.2"
54
54
  pytest-cov = "^7.0.0"
55
- ruff = "^0.13.0"
55
+ ruff = "^0.14.0"
56
56
  types-deprecated = "^1.2.15.20241117"
57
57
  types-requests = ">=2.31"
58
58
 
File without changes
File without changes
File without changes