aioccl 2025.6__tar.gz → 2025.6.2__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 → aioccl-2025.6.2}/PKG-INFO +1 -1
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl/device.py +4 -1
- aioccl-2025.6.2/aioccl/exception.py +7 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl/sensor.py +7 -7
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl/server.py +3 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl.egg-info/PKG-INFO +1 -1
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl.egg-info/SOURCES.txt +1 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/setup.py +1 -1
- {aioccl-2025.6 → aioccl-2025.6.2}/LICENSE +0 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/README.md +0 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl/__init__.py +0 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl.egg-info/dependency_links.txt +0 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl.egg-info/requires.txt +0 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/aioccl.egg-info/top_level.txt +0 -0
- {aioccl-2025.6 → aioccl-2025.6.2}/setup.cfg +0 -0
@@ -6,6 +6,7 @@ import logging
|
|
6
6
|
import time
|
7
7
|
from typing import Callable, TypedDict
|
8
8
|
|
9
|
+
from .exception import CCLDataUpdateException
|
9
10
|
from .sensor import CCLSensor, CCL_SENSORS
|
10
11
|
|
11
12
|
_LOGGER = logging.getLogger(__name__)
|
@@ -83,10 +84,12 @@ class CCLDevice:
|
|
83
84
|
def fw_ver(self) -> str | None:
|
84
85
|
"""Return the firmware version."""
|
85
86
|
return self._info["fw_ver"]
|
86
|
-
|
87
|
+
|
87
88
|
@property
|
88
89
|
def get_sensors(self) -> dict[str, CCLSensor]:
|
89
90
|
"""Get all types of sensor data under this device."""
|
91
|
+
if len(self._sensors) == 0:
|
92
|
+
raise CCLDataUpdateException("Device is offline or not ready")
|
90
93
|
return self._sensors
|
91
94
|
|
92
95
|
def update_info(self, new_info: dict[str, None | str]) -> None:
|
@@ -277,25 +277,25 @@ CCL_SENSORS: dict[str, CCLSensorPreset] = {
|
|
277
277
|
"CH7 Type", CCLSensorTypes.CH_SENSOR_TYPE, CCLDeviceCompartment.OTHER
|
278
278
|
),
|
279
279
|
"t6c1wls": CCLSensorPreset(
|
280
|
-
"Leakage CH1", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
280
|
+
"Leakage CH1", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
281
281
|
),
|
282
282
|
"t6c2wls": CCLSensorPreset(
|
283
|
-
"Leakage CH2", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
283
|
+
"Leakage CH2", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
284
284
|
),
|
285
285
|
"t6c3wls": CCLSensorPreset(
|
286
|
-
"Leakage CH3", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
286
|
+
"Leakage CH3", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
287
287
|
),
|
288
288
|
"t6c4wls": CCLSensorPreset(
|
289
|
-
"Leakage CH4", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
289
|
+
"Leakage CH4", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
290
290
|
),
|
291
291
|
"t6c5wls": CCLSensorPreset(
|
292
|
-
"Leakage CH5", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
292
|
+
"Leakage CH5", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
293
293
|
),
|
294
294
|
"t6c6wls": CCLSensorPreset(
|
295
|
-
"Leakage CH6", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
295
|
+
"Leakage CH6", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
296
296
|
),
|
297
297
|
"t6c7wls": CCLSensorPreset(
|
298
|
-
"Leakage CH7", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
298
|
+
"Leakage CH7", CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER
|
299
299
|
),
|
300
300
|
"t5lskm": CCLSensorPreset(
|
301
301
|
"Lightning Distance",
|
@@ -8,6 +8,7 @@ import logging
|
|
8
8
|
from aiohttp import web
|
9
9
|
|
10
10
|
from .device import CCLDevice, CCL_DEVICE_INFO_TYPES
|
11
|
+
from .exception import CCLDeviceRegistrationException
|
11
12
|
from .sensor import CCL_SENSORS
|
12
13
|
|
13
14
|
_LOGGER = logging.getLogger(__name__)
|
@@ -23,6 +24,8 @@ class CCLServer:
|
|
23
24
|
@staticmethod
|
24
25
|
def register(device: CCLDevice) -> None:
|
25
26
|
"""Register a device with a passkey."""
|
27
|
+
if CCLServer.devices[device.passkey] is not None:
|
28
|
+
raise CCLDeviceRegistrationException("Device already exists")
|
26
29
|
CCLServer.devices[device.passkey] = device
|
27
30
|
_LOGGER.debug("Device registered: %s", device.passkey)
|
28
31
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|