aioccl 2025.6.5__tar.gz → 2025.6.6__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.
- {aioccl-2025.6.5 → aioccl-2025.6.6}/PKG-INFO +1 -1
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl/device.py +1 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl/sensor.py +17 -7
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl.egg-info/PKG-INFO +1 -1
- {aioccl-2025.6.5 → aioccl-2025.6.6}/setup.py +1 -1
- {aioccl-2025.6.5 → aioccl-2025.6.6}/LICENSE +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/README.md +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl/__init__.py +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl/exception.py +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl/server.py +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl.egg-info/SOURCES.txt +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl.egg-info/dependency_links.txt +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl.egg-info/requires.txt +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/aioccl.egg-info/top_level.txt +0 -0
- {aioccl-2025.6.5 → aioccl-2025.6.6}/setup.cfg +0 -0
@@ -104,6 +104,7 @@ class CCLDevice:
|
|
104
104
|
if key not in self._sensors:
|
105
105
|
self._sensors[key] = CCLSensor(key)
|
106
106
|
self._new_sensors.append(self._sensors[key])
|
107
|
+
self._sensors[key].last_update_time = time.monotonic()
|
107
108
|
self._sensors[key].value = value
|
108
109
|
|
109
110
|
add_count = self._publish_new_sensors()
|
@@ -11,7 +11,8 @@ class CCLSensor:
|
|
11
11
|
|
12
12
|
def __init__(self, key: str):
|
13
13
|
"""Initialize a CCL sensor."""
|
14
|
-
self.
|
14
|
+
self._last_update_time: float | None = None
|
15
|
+
self._value: str | int | float | None = None
|
15
16
|
|
16
17
|
if key in CCL_SENSORS:
|
17
18
|
self._key = key
|
@@ -32,14 +33,23 @@ class CCLSensor:
|
|
32
33
|
return CCL_SENSORS[self._key].sensor_type
|
33
34
|
|
34
35
|
@property
|
35
|
-
def compartment(self) ->
|
36
|
+
def compartment(self) -> str | None:
|
36
37
|
"""Decide which compartment it belongs to."""
|
37
38
|
if CCL_SENSORS[self._key].compartment in CCLDeviceCompartment:
|
38
39
|
return CCL_SENSORS[self._key].compartment.value
|
39
40
|
return None
|
40
41
|
|
41
42
|
@property
|
42
|
-
def
|
43
|
+
def last_update_time(self) -> float | None:
|
44
|
+
"""Return the last update time of the sensor."""
|
45
|
+
return self._last_update_time
|
46
|
+
|
47
|
+
@last_update_time.setter
|
48
|
+
def last_update_time(self, new_value):
|
49
|
+
self._last_update_time = new_value
|
50
|
+
|
51
|
+
@property
|
52
|
+
def value(self) -> str | int | float | None:
|
43
53
|
"""Return the intrinsic sensor value."""
|
44
54
|
if self.sensor_type.name in CCL_SENSOR_VALUES:
|
45
55
|
return CCL_SENSOR_VALUES[self.sensor_type.name].get(self._value)
|
@@ -77,7 +87,7 @@ class CCLSensorTypes(enum.Enum):
|
|
77
87
|
CO = 13
|
78
88
|
CO2 = 14
|
79
89
|
VOLATILE = 15
|
80
|
-
|
90
|
+
VOC_LEVEL = 16
|
81
91
|
PM10 = 17
|
82
92
|
PM25 = 18
|
83
93
|
AQI = 19
|
@@ -92,8 +102,8 @@ class CCLSensorTypes(enum.Enum):
|
|
92
102
|
class CCLDeviceCompartment(enum.Enum):
|
93
103
|
"""Grouping of CCL sensors."""
|
94
104
|
|
95
|
-
MAIN = "Console & Sensor
|
96
|
-
OTHER = "Other
|
105
|
+
MAIN = "Console & Sensor array"
|
106
|
+
OTHER = "Other sensors"
|
97
107
|
STATUS = "Status"
|
98
108
|
|
99
109
|
|
@@ -211,7 +221,7 @@ CCL_SENSORS: dict[str, CCLSensorPreset] = {
|
|
211
221
|
"Air Quality: PM2.5 AQI", CCLSensorTypes.AQI, CCLDeviceCompartment.OTHER
|
212
222
|
),
|
213
223
|
"t9voclv": CCLSensorPreset(
|
214
|
-
"Air Quality: VOC Level", CCLSensorTypes.
|
224
|
+
"Air Quality: VOC Level", CCLSensorTypes.VOC_LEVEL, CCLDeviceCompartment.OTHER
|
215
225
|
),
|
216
226
|
"t234c1tem": CCLSensorPreset(
|
217
227
|
"CH1 Temperature", CCLSensorTypes.TEMPERATURE, CCLDeviceCompartment.OTHER
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|