aioccl 2025.6.3__tar.gz → 2025.6.4__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.3
3
+ Version: 2025.6.4
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
@@ -145,20 +145,24 @@ class CCLDevice:
145
145
  """Remove a registered callback."""
146
146
  self._new_sensor_callbacks.discard(callback)
147
147
 
148
- def _publish_new_sensors(self) -> None:
148
+ def _publish_new_sensors(self) -> int:
149
149
  """Schedule all registered callbacks to add new sensors."""
150
- count = 0
150
+ success_count = 0
151
+ error_count = 0
151
152
  for sensor in self._new_sensors[:]:
152
153
  try:
154
+ assert len(self._new_sensor_callbacks) > 0
153
155
  for callback in self._new_sensor_callbacks:
154
- callback(sensor)
156
+ if callback(sensor) is not True:
157
+ raise CCLDataUpdateException("Failed to publish new sensor")
155
158
  self._new_sensors.remove(sensor)
156
- count += 1
157
- except Exception as err: # pylint: disable=broad-exception-caught
158
- _LOGGER.warning(
159
- "Error while adding sensor %s for device %s: %s",
160
- sensor.key,
159
+ success_count += 1
160
+ except Exception: # pylint: disable=broad-exception-caught
161
+ error_count += 1
162
+ if error_count > 0:
163
+ _LOGGER.warning(
164
+ "Failed to add %s sensors for device %s",
165
+ error_count,
161
166
  self.device_id,
162
- err,
163
167
  )
164
- return count
168
+ return success_count
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioccl
3
- Version: 2025.6.3
3
+ Version: 2025.6.4
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.3"
6
+ VERSION = "2025.6.4"
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
File without changes