aioccl 2025.6.6__tar.gz → 2025.6.7__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.6 → aioccl-2025.6.7}/PKG-INFO +1 -1
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl/device.py +12 -9
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl.egg-info/PKG-INFO +1 -1
- {aioccl-2025.6.6 → aioccl-2025.6.7}/setup.py +1 -1
- {aioccl-2025.6.6 → aioccl-2025.6.7}/LICENSE +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/README.md +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl/__init__.py +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl/exception.py +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl/sensor.py +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl/server.py +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl.egg-info/SOURCES.txt +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl.egg-info/dependency_links.txt +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl.egg-info/requires.txt +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/aioccl.egg-info/top_level.txt +0 -0
- {aioccl-2025.6.6 → aioccl-2025.6.7}/setup.cfg +0 -0
@@ -98,15 +98,8 @@ class CCLDevice:
|
|
98
98
|
self._info[key] = str(value)
|
99
99
|
self._info["last_update_time"] = time.monotonic()
|
100
100
|
|
101
|
-
def
|
102
|
-
"""
|
103
|
-
for key, value in data.items():
|
104
|
-
if key not in self._sensors:
|
105
|
-
self._sensors[key] = CCLSensor(key)
|
106
|
-
self._new_sensors.append(self._sensors[key])
|
107
|
-
self._sensors[key].last_update_time = time.monotonic()
|
108
|
-
self._sensors[key].value = value
|
109
|
-
|
101
|
+
def push_updates(self) -> None:
|
102
|
+
"""Push sensor updates."""
|
110
103
|
add_count = self._publish_new_sensors()
|
111
104
|
if add_count > 0:
|
112
105
|
_LOGGER.debug(
|
@@ -122,6 +115,16 @@ class CCLDevice:
|
|
122
115
|
self.device_id,
|
123
116
|
self.last_update_time,
|
124
117
|
)
|
118
|
+
|
119
|
+
def process_data(self, data: dict[str, None | str | int | float]) -> None:
|
120
|
+
"""Add or update all sensor values."""
|
121
|
+
for key, value in data.items():
|
122
|
+
if key not in self._sensors:
|
123
|
+
self._sensors[key] = CCLSensor(key)
|
124
|
+
self._new_sensors.append(self._sensors[key])
|
125
|
+
self._sensors[key].last_update_time = time.monotonic()
|
126
|
+
self._sensors[key].value = value
|
127
|
+
self.push_updates()
|
125
128
|
|
126
129
|
def set_update_callback(self, callback: Callable[[], None]) -> None:
|
127
130
|
"""Set the callback function to update sensor data."""
|
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
|
File without changes
|