aioccl 2024.9.2__py3-none-any.whl → 2024.9.3__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 +1 -6
- aioccl/sensor.py +13 -15
- {aioccl-2024.9.2.dist-info → aioccl-2024.9.3.dist-info}/METADATA +1 -1
- aioccl-2024.9.3.dist-info/RECORD +9 -0
- {aioccl-2024.9.2.dist-info → aioccl-2024.9.3.dist-info}/WHEEL +1 -1
- aioccl-2024.9.2.dist-info/RECORD +0 -9
- {aioccl-2024.9.2.dist-info → aioccl-2024.9.3.dist-info}/LICENSE +0 -0
- {aioccl-2024.9.2.dist-info → aioccl-2024.9.3.dist-info}/top_level.txt +0 -0
aioccl/device.py
CHANGED
@@ -9,7 +9,7 @@ from .sensor import CCLSensor, CCL_SENSORS
|
|
9
9
|
|
10
10
|
_LOGGER = logging.getLogger(__name__)
|
11
11
|
|
12
|
-
CCL_DEVICE_INFO_TYPES = ("serial_no", "mac_address", "model", "
|
12
|
+
CCL_DEVICE_INFO_TYPES = ("serial_no", "mac_address", "model", "fw_ver")
|
13
13
|
|
14
14
|
class CCLDevice:
|
15
15
|
def __init__(self, passkey: str):
|
@@ -43,10 +43,6 @@ class CCLDevice:
|
|
43
43
|
def name(self) -> str | None:
|
44
44
|
return self._model + " - " + self.device_id
|
45
45
|
|
46
|
-
@property
|
47
|
-
def serial_no(self) -> str | None:
|
48
|
-
return self._serial_no
|
49
|
-
|
50
46
|
@property
|
51
47
|
def mac_address(self) -> str | None:
|
52
48
|
return self._mac_address
|
@@ -69,7 +65,6 @@ class CCLDevice:
|
|
69
65
|
|
70
66
|
def update_info(self, info: dict[str, None | str]) -> None:
|
71
67
|
"""Add or update device info."""
|
72
|
-
self._serial_no = info.get('serial_no')
|
73
68
|
self._mac_address = info.get('mac_address')
|
74
69
|
self._model = info.get('model')
|
75
70
|
self._fw_ver = info.get('fw_ver')
|
aioccl/sensor.py
CHANGED
@@ -46,14 +46,8 @@ class CCLSensor:
|
|
46
46
|
return int(self._value) - 1
|
47
47
|
except ValueError:
|
48
48
|
pass
|
49
|
-
|
50
|
-
|
51
|
-
return int(self._value)
|
52
|
-
except ValueError:
|
53
|
-
try:
|
54
|
-
return float(self._value)
|
55
|
-
except ValueError:
|
56
|
-
return self._value
|
49
|
+
else:
|
50
|
+
return self._value
|
57
51
|
|
58
52
|
@value.setter
|
59
53
|
def value(self, new_value):
|
@@ -88,9 +82,9 @@ class CCLSensorTypes(enum.Enum):
|
|
88
82
|
AQI = 19
|
89
83
|
LEAKAGE = 20
|
90
84
|
BATTERY = 21
|
91
|
-
|
92
|
-
|
93
|
-
|
85
|
+
LIGHTNING_DISTANCE = 22
|
86
|
+
LIGHTNING_DURATION = 23
|
87
|
+
LIGHTNING_FREQUENCY = 24
|
94
88
|
|
95
89
|
class CCLDeviceCompartment(enum.Enum):
|
96
90
|
MAIN = 'Console and Sensor Array'
|
@@ -173,10 +167,14 @@ CCL_SENSORS: dict[str, CCLSensorPreset] = {
|
|
173
167
|
't6c5wls': CCLSensorPreset('Leakage CH5', CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER),
|
174
168
|
't6c6wls': CCLSensorPreset('Leakage CH6', CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER),
|
175
169
|
't6c7wls': CCLSensorPreset('Leakage CH7', CCLSensorTypes.LEAKAGE, CCLDeviceCompartment.OTHER),
|
176
|
-
't5lskm': CCLSensorPreset('Lightning Distance', CCLSensorTypes.
|
177
|
-
't5lst': CCLSensorPreset('Lightning: Last Strike', CCLSensorTypes.
|
178
|
-
't5lsf': CCLSensorPreset('Lightning:
|
179
|
-
'
|
170
|
+
't5lskm': CCLSensorPreset('Lightning Distance', CCLSensorTypes.LIGHTNING_DISTANCE, CCLDeviceCompartment.OTHER),
|
171
|
+
't5lst': CCLSensorPreset('Lightning: Last Strike', CCLSensorTypes.LIGHTNING_DURATION, CCLDeviceCompartment.OTHER),
|
172
|
+
't5lsf': CCLSensorPreset('Lightning: Past 60 mins Strikes', CCLSensorTypes.LIGHTNING_FREQUENCY, CCLDeviceCompartment.OTHER),
|
173
|
+
't5ls30mtc': CCLSensorPreset('Lightning: Strikes in 30 mins', CCLSensorTypes.LIGHTNING_FREQUENCY, CCLDeviceCompartment.OTHER),
|
174
|
+
't5ls5mtc': CCLSensorPreset('Lightning: Strikes in 5 mins', CCLSensorTypes.LIGHTNING_FREQUENCY, CCLDeviceCompartment.OTHER),
|
175
|
+
't5ls1dtc': CCLSensorPreset('Lightning: Strikes in day', CCLSensorTypes.LIGHTNING_FREQUENCY, CCLDeviceCompartment.OTHER),
|
176
|
+
't5ls1htc': CCLSensorPreset('Lightning: Strikes in hour', CCLSensorTypes.LIGHTNING_FREQUENCY, CCLDeviceCompartment.OTHER),
|
177
|
+
|
180
178
|
# Status 78-119
|
181
179
|
't234c1bat': CCLSensorPreset('Battery: CH1', CCLSensorTypes.BATTERY_BINARY, CCLDeviceCompartment.STATUS, True),
|
182
180
|
't234c2bat': CCLSensorPreset('Battery: CH2', CCLSensorTypes.BATTERY_BINARY, CCLDeviceCompartment.STATUS, True),
|
@@ -0,0 +1,9 @@
|
|
1
|
+
aioccl/__init__.py,sha256=iL1OC2F_rf3qkswi-bO8Y_uj2-lf284LCnyxwqdLUU8,137
|
2
|
+
aioccl/device.py,sha256=ALvK7qvGlG0duS1axPz7uQj85vHW1iyzezvX2bD2Zuc,4994
|
3
|
+
aioccl/sensor.py,sha256=l0eCWCSW4dpSRGZAGieCzySsCy7NuEdY1hc5ZTyp5Lo,14646
|
4
|
+
aioccl/server.py,sha256=-ZDii20CLqj4_jqVVqRMlnvg-CCtJiZjuMMDamem0DE,3717
|
5
|
+
aioccl-2024.9.3.dist-info/LICENSE,sha256=PBRsTHchx7o0TQ2R2ktEAfFmn1iNHTxcOP_xaeuSAuo,11349
|
6
|
+
aioccl-2024.9.3.dist-info/METADATA,sha256=AXTHUeR413aPP_KNvcPF9OgTaVJ_jtxcQdMjxL2L1Es,769
|
7
|
+
aioccl-2024.9.3.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
8
|
+
aioccl-2024.9.3.dist-info/top_level.txt,sha256=-xIJfyfXTaW_EH7XCIHyxjSSSwjLmawa2qhsrHZH1vA,7
|
9
|
+
aioccl-2024.9.3.dist-info/RECORD,,
|
aioccl-2024.9.2.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
aioccl/__init__.py,sha256=iL1OC2F_rf3qkswi-bO8Y_uj2-lf284LCnyxwqdLUU8,137
|
2
|
-
aioccl/device.py,sha256=Cr33h7HrM2YS-u9BxoJASd2X5nBba37_fC85XunhVcs,5132
|
3
|
-
aioccl/sensor.py,sha256=XETDVRuOnxPttEE9Y-KYDgZHFvU4IbUHwBTMaa66TsY,14351
|
4
|
-
aioccl/server.py,sha256=-ZDii20CLqj4_jqVVqRMlnvg-CCtJiZjuMMDamem0DE,3717
|
5
|
-
aioccl-2024.9.2.dist-info/LICENSE,sha256=PBRsTHchx7o0TQ2R2ktEAfFmn1iNHTxcOP_xaeuSAuo,11349
|
6
|
-
aioccl-2024.9.2.dist-info/METADATA,sha256=m2Orbnjsypy7Lb-Q4fbtmdB_taocxDYVDoAjHqJffXE,769
|
7
|
-
aioccl-2024.9.2.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
8
|
-
aioccl-2024.9.2.dist-info/top_level.txt,sha256=-xIJfyfXTaW_EH7XCIHyxjSSSwjLmawa2qhsrHZH1vA,7
|
9
|
-
aioccl-2024.9.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|