aioccl 2025.7__py3-none-any.whl → 2025.7.1__py3-none-any.whl

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/device.py CHANGED
@@ -110,11 +110,9 @@ class CCLDevice:
110
110
 
111
111
  def push_updates(self) -> None:
112
112
  """Push sensor updates."""
113
- add_count = self._publish_new_sensors()
114
- if add_count > 0:
113
+ if self._publish_new_sensors() is True:
115
114
  _LOGGER.debug(
116
- "Added %s new sensors for device %s at %s.",
117
- add_count,
115
+ "Added new sensors for device %s at %s.",
118
116
  self.device_id,
119
117
  self.last_update_time,
120
118
  )
@@ -147,23 +145,12 @@ class CCLDevice:
147
145
  err,
148
146
  )
149
147
 
150
- def _publish_new_sensors(self) -> int:
148
+ def _publish_new_sensors(self) -> bool | None:
151
149
  """Schedule all registered callbacks to add new sensors."""
152
- success_count = 0
153
- error_count = 0
154
- for sensor in self._new_sensors[:]:
155
- try:
156
- assert self._new_sensor_callback is not None
157
- if self._new_sensor_callback(sensor) is not True:
158
- raise CCLDataUpdateException("Failed to publish new sensor")
159
- self._new_sensors.remove(sensor)
160
- success_count += 1
161
- except Exception: # pylint: disable=broad-exception-caught
162
- error_count += 1
163
- if error_count > 0:
164
- _LOGGER.warning(
165
- "Failed to add %s sensors for device %s",
166
- error_count,
167
- self.device_id,
168
- )
169
- return success_count
150
+ try:
151
+ assert self._new_sensor_callback is not None
152
+ if self._new_sensor_callback(self._new_sensors) is not True:
153
+ raise CCLDataUpdateException("Failed to publish new sensor")
154
+ except Exception: # pylint: disable=broad-exception-caught
155
+ return None
156
+ return True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioccl
3
- Version: 2025.7
3
+ Version: 2025.7.1
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
@@ -0,0 +1,10 @@
1
+ aioccl/__init__.py,sha256=XnegKtbvHvUTwVuuWNLb4LB9ZuGGar0xrZYOqk7scyg,133
2
+ aioccl/device.py,sha256=J-C_ajoORM-tq6g_QmUV95c1B_nFw8piq0S_0lGQjjk,5168
3
+ aioccl/exception.py,sha256=iTukjNcnVXVhGV_sMGj2D1jzjVXB0qcyOlX2vB8G4AY,211
4
+ aioccl/sensor.py,sha256=2HFUGEYPvbWpkHsZwrrCvtCZGrI5ZGEuGuBCPE9W-NQ,16650
5
+ aioccl/server.py,sha256=W8OL64dAi2WAeS4isx8usAG-9D3q4mBIl9pxxb4Iuhw,3573
6
+ aioccl-2025.7.1.dist-info/licenses/LICENSE,sha256=PBRsTHchx7o0TQ2R2ktEAfFmn1iNHTxcOP_xaeuSAuo,11349
7
+ aioccl-2025.7.1.dist-info/METADATA,sha256=JcubvaoC6oqknFGPGMj19mN8bHnqi1rMts4U99kgNRs,991
8
+ aioccl-2025.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ aioccl-2025.7.1.dist-info/top_level.txt,sha256=-xIJfyfXTaW_EH7XCIHyxjSSSwjLmawa2qhsrHZH1vA,7
10
+ aioccl-2025.7.1.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- aioccl/__init__.py,sha256=XnegKtbvHvUTwVuuWNLb4LB9ZuGGar0xrZYOqk7scyg,133
2
- aioccl/device.py,sha256=xb6UGGhlpFJ_2CAFv19oYqajtTTt3i-pEJSn3vmoWAE,5628
3
- aioccl/exception.py,sha256=iTukjNcnVXVhGV_sMGj2D1jzjVXB0qcyOlX2vB8G4AY,211
4
- aioccl/sensor.py,sha256=2HFUGEYPvbWpkHsZwrrCvtCZGrI5ZGEuGuBCPE9W-NQ,16650
5
- aioccl/server.py,sha256=W8OL64dAi2WAeS4isx8usAG-9D3q4mBIl9pxxb4Iuhw,3573
6
- aioccl-2025.7.dist-info/licenses/LICENSE,sha256=PBRsTHchx7o0TQ2R2ktEAfFmn1iNHTxcOP_xaeuSAuo,11349
7
- aioccl-2025.7.dist-info/METADATA,sha256=fQo0mIj1o5xp8dByu-Y1PPwbweJBGi4dE5Wu_-UG6x4,989
8
- aioccl-2025.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- aioccl-2025.7.dist-info/top_level.txt,sha256=-xIJfyfXTaW_EH7XCIHyxjSSSwjLmawa2qhsrHZH1vA,7
10
- aioccl-2025.7.dist-info/RECORD,,