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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioccl
3
- Version: 2025.6.5
3
+ Version: 2025.6.6
4
4
  Summary: A Python library for CCL API server
5
5
  Home-page: https://github.com/CCL-Electronics-Ltd/aioccl
6
6
  Download-URL: https://github.com/CCL-Electronics-Ltd/aioccl
@@ -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._value: None | str | int | float = None
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) -> None | str:
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 value(self) -> None | str | int | float:
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
- VOC = 16
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 Array"
96
- OTHER = "Other Sensors"
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.VOC, CCLDeviceCompartment.OTHER
224
+ "Air Quality: VOC Level", CCLSensorTypes.VOC_LEVEL, CCLDeviceCompartment.OTHER
215
225
  ),
216
226
  "t234c1tem": CCLSensorPreset(
217
227
  "CH1 Temperature", CCLSensorTypes.TEMPERATURE, CCLDeviceCompartment.OTHER
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioccl
3
- Version: 2025.6.5
3
+ Version: 2025.6.6
4
4
  Summary: A Python library for CCL API server
5
5
  Home-page: https://github.com/CCL-Electronics-Ltd/aioccl
6
6
  Download-URL: https://github.com/CCL-Electronics-Ltd/aioccl
@@ -3,7 +3,7 @@
3
3
  from pathlib import Path
4
4
  from setuptools import find_packages, setup
5
5
 
6
- VERSION = "2025.6.5"
6
+ VERSION = "2025.6.6"
7
7
 
8
8
  ROOT_DIR = Path(__file__).parent.resolve()
9
9
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes