zwave-js-server-python 0.55.4__tar.gz → 0.57.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/PKG-INFO +3 -3
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/pyproject.toml +2 -2
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/__init__.py +3 -3
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/meter.py +1 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/controller/__init__.py +5 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/controller/data_model.py +1 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/controller/inclusion_and_provisioning.py +41 -32
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/device_class.py +0 -14
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/node/__init__.py +21 -15
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/node/data_model.py +1 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/value.py +0 -8
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server_python.egg-info/PKG-INFO +3 -3
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/LICENSE +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/MANIFEST.in +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/README.md +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/setup.cfg +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/__init__.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/__main__.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/client.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/__init__.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/barrier_operator.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/basic.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/central_scene.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/color_switch.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/energy_production.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/entry_control.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/humidity_control.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/lock.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/multilevel_sensor.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/multilevel_switch.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/notification.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/power_level.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/protection.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/scene_activation.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/sound_switch.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/thermostat.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/wake_up.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/command_class/window_covering.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/dump.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/event.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/exceptions.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/firmware.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/__init__.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/association.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/command_class.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/controller/event_model.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/controller/firmware.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/controller/rebuild_routes.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/controller/statistics.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/device_config.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/driver.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/duration.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/endpoint.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/log_config.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/log_message.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/node/event_model.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/node/firmware.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/node/health_check.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/node/statistics.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/notification.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/statistics.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/utils.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/version.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/py.typed +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/__init__.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/command_class/__init__.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/command_class/energy_production.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/command_class/meter.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/command_class/multilevel_sensor.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/helpers.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/lock.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/multicast.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/node.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/version.py +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server_python.egg-info/SOURCES.txt +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server_python.egg-info/dependency_links.txt +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server_python.egg-info/entry_points.txt +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server_python.egg-info/requires.txt +0 -0
- {zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: zwave-js-server-python
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.57.0
|
4
4
|
Summary: Python wrapper for zwave-js-server
|
5
5
|
Author-email: Home Assistant Team <hello@home-assistant.io>
|
6
6
|
License: Apache License
|
@@ -212,9 +212,9 @@ Classifier: Development Status :: 4 - Beta
|
|
212
212
|
Classifier: Intended Audience :: Developers
|
213
213
|
Classifier: Natural Language :: English
|
214
214
|
Classifier: Programming Language :: Python :: 3
|
215
|
-
Classifier: Programming Language :: Python :: 3.
|
215
|
+
Classifier: Programming Language :: Python :: 3.12
|
216
216
|
Classifier: Topic :: Home Automation
|
217
|
-
Requires-Python: >=3.
|
217
|
+
Requires-Python: >=3.12
|
218
218
|
Description-Content-Type: text/markdown
|
219
219
|
License-File: LICENSE
|
220
220
|
Requires-Dist: aiohttp>3
|
@@ -7,7 +7,7 @@ name = "zwave-js-server-python"
|
|
7
7
|
authors = [{ name = "Home Assistant Team", email = "hello@home-assistant.io" }]
|
8
8
|
description = "Python wrapper for zwave-js-server"
|
9
9
|
readme = "README.md"
|
10
|
-
requires-python = ">=3.
|
10
|
+
requires-python = ">=3.12"
|
11
11
|
license = { file = "LICENSE" }
|
12
12
|
keywords = ["home", "automation", "zwave", "zwave-js"]
|
13
13
|
classifiers = [
|
@@ -15,7 +15,7 @@ classifiers = [
|
|
15
15
|
"Intended Audience :: Developers",
|
16
16
|
"Natural Language :: English",
|
17
17
|
"Programming Language :: Python :: 3",
|
18
|
-
"Programming Language :: Python :: 3.
|
18
|
+
"Programming Language :: Python :: 3.12",
|
19
19
|
"Topic :: Home Automation",
|
20
20
|
]
|
21
21
|
dependencies = ["aiohttp>3", "pydantic>=1.10.0"]
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/const/__init__.py
RENAMED
@@ -8,12 +8,12 @@ import logging
|
|
8
8
|
from typing import TypedDict
|
9
9
|
|
10
10
|
PACKAGE_NAME = "zwave-js-server-python"
|
11
|
-
__version__ = "0.
|
11
|
+
__version__ = "0.57.0"
|
12
12
|
|
13
13
|
# minimal server schema version we can handle
|
14
|
-
MIN_SERVER_SCHEMA_VERSION =
|
14
|
+
MIN_SERVER_SCHEMA_VERSION = 36
|
15
15
|
# max server schema version we can handle (and our code is compatible with)
|
16
|
-
MAX_SERVER_SCHEMA_VERSION =
|
16
|
+
MAX_SERVER_SCHEMA_VERSION = 36
|
17
17
|
|
18
18
|
VALUE_UNKNOWN = "unknown"
|
19
19
|
|
@@ -244,6 +244,11 @@ class Controller(EventBase):
|
|
244
244
|
"""Return status."""
|
245
245
|
return ControllerStatus(self.data["status"])
|
246
246
|
|
247
|
+
@property
|
248
|
+
def supports_long_range(self) -> bool | None:
|
249
|
+
"""Return whether controller supports long range or not."""
|
250
|
+
return self.data.get("supportsLongRange")
|
251
|
+
|
247
252
|
def update(self, data: ControllerDataType) -> None:
|
248
253
|
"""Update controller data."""
|
249
254
|
self.data = data
|
@@ -49,6 +49,7 @@ class ProvisioningEntry:
|
|
49
49
|
security_classes: list[SecurityClass]
|
50
50
|
requested_security_classes: list[SecurityClass] | None = None
|
51
51
|
status: ProvisioningEntryStatus = ProvisioningEntryStatus.ACTIVE
|
52
|
+
protocol: Protocols | None = None
|
52
53
|
additional_properties: dict[str, Any] | None = None
|
53
54
|
|
54
55
|
def to_dict(self) -> dict[str, Any]:
|
@@ -63,6 +64,8 @@ class ProvisioningEntry:
|
|
63
64
|
data["requestedSecurityClasses"] = [
|
64
65
|
sec_cls.value for sec_cls in self.requested_security_classes
|
65
66
|
]
|
67
|
+
if self.protocol is not None:
|
68
|
+
data["protocol"] = self.protocol.value
|
66
69
|
return data
|
67
70
|
|
68
71
|
@classmethod
|
@@ -73,19 +76,21 @@ class ProvisioningEntry:
|
|
73
76
|
security_classes=[
|
74
77
|
SecurityClass(sec_cls) for sec_cls in data["securityClasses"]
|
75
78
|
],
|
76
|
-
additional_properties={
|
77
|
-
k: v
|
78
|
-
for k, v in data.items()
|
79
|
-
if k
|
80
|
-
not in {"dsk", "securityClasses", "requestedSecurityClasses", "status"}
|
81
|
-
},
|
82
79
|
)
|
80
|
+
if additional_properties := {
|
81
|
+
k: v
|
82
|
+
for k, v in data.items()
|
83
|
+
if k not in ("dsk", "securityClasses", "requestedSecurityClasses", "status")
|
84
|
+
}:
|
85
|
+
cls_instance.additional_properties = additional_properties
|
83
86
|
if "requestedSecurityClasses" in data:
|
84
87
|
cls_instance.requested_security_classes = [
|
85
88
|
SecurityClass(sec_cls) for sec_cls in data["requestedSecurityClasses"]
|
86
89
|
]
|
87
90
|
if "status" in data:
|
88
91
|
cls_instance.status = ProvisioningEntryStatus(data["status"])
|
92
|
+
if "protocol" in data:
|
93
|
+
cls_instance.protocol = Protocols(data["protocol"])
|
89
94
|
return cls_instance
|
90
95
|
|
91
96
|
|
@@ -143,6 +148,12 @@ class QRProvisioningInformation(ProvisioningEntry, QRProvisioningInformationMixi
|
|
143
148
|
@classmethod
|
144
149
|
def from_dict(cls, data: dict[str, Any]) -> QRProvisioningInformation:
|
145
150
|
"""Return QRProvisioningInformation from data dict."""
|
151
|
+
supported_protocols: list[Protocols] | None = None
|
152
|
+
if "supportedProtocols" in data:
|
153
|
+
supported_protocols = [
|
154
|
+
Protocols(supported_protocol)
|
155
|
+
for supported_protocol in data["supportedProtocols"]
|
156
|
+
]
|
146
157
|
cls_instance = cls(
|
147
158
|
version=QRCodeVersion(data["version"]),
|
148
159
|
security_classes=[
|
@@ -158,33 +169,31 @@ class QRProvisioningInformation(ProvisioningEntry, QRProvisioningInformationMixi
|
|
158
169
|
application_version=data["applicationVersion"],
|
159
170
|
max_inclusion_request_interval=data.get("maxInclusionRequestInterval"),
|
160
171
|
uuid=data.get("uuid"),
|
161
|
-
supported_protocols=
|
162
|
-
Protocols(supported_protocol)
|
163
|
-
for supported_protocol in data.get("supportedProtocols", [])
|
164
|
-
],
|
165
|
-
additional_properties={
|
166
|
-
k: v
|
167
|
-
for k, v in data.items()
|
168
|
-
if k
|
169
|
-
not in {
|
170
|
-
"version",
|
171
|
-
"securityClasses",
|
172
|
-
"requestedSecurityClasses",
|
173
|
-
"dsk",
|
174
|
-
"genericDeviceClass",
|
175
|
-
"specificDeviceClass",
|
176
|
-
"installerIconType",
|
177
|
-
"manufacturerId",
|
178
|
-
"productType",
|
179
|
-
"productId",
|
180
|
-
"applicationVersion",
|
181
|
-
"maxInclusionRequestInterval",
|
182
|
-
"uuid",
|
183
|
-
"supportedProtocols",
|
184
|
-
"status",
|
185
|
-
}
|
186
|
-
},
|
172
|
+
supported_protocols=supported_protocols,
|
187
173
|
)
|
174
|
+
if additional_properties := {
|
175
|
+
k: v
|
176
|
+
for k, v in data.items()
|
177
|
+
if k
|
178
|
+
not in (
|
179
|
+
"version",
|
180
|
+
"securityClasses",
|
181
|
+
"requestedSecurityClasses",
|
182
|
+
"dsk",
|
183
|
+
"genericDeviceClass",
|
184
|
+
"specificDeviceClass",
|
185
|
+
"installerIconType",
|
186
|
+
"manufacturerId",
|
187
|
+
"productType",
|
188
|
+
"productId",
|
189
|
+
"applicationVersion",
|
190
|
+
"maxInclusionRequestInterval",
|
191
|
+
"uuid",
|
192
|
+
"supportedProtocols",
|
193
|
+
"status",
|
194
|
+
)
|
195
|
+
}:
|
196
|
+
cls_instance.additional_properties = additional_properties
|
188
197
|
if "requestedSecurityClasses" in data:
|
189
198
|
cls_instance.requested_security_classes = [
|
190
199
|
SecurityClass(sec_cls) for sec_cls in data["requestedSecurityClasses"]
|
@@ -23,8 +23,6 @@ class DeviceClassDataType(TypedDict):
|
|
23
23
|
basic: DeviceClassItemDataType
|
24
24
|
generic: DeviceClassItemDataType
|
25
25
|
specific: DeviceClassItemDataType
|
26
|
-
mandatorySupportedCCs: list[int]
|
27
|
-
mandatoryControlledCCs: list[int]
|
28
26
|
|
29
27
|
|
30
28
|
@dataclass
|
@@ -43,8 +41,6 @@ class DeviceClass:
|
|
43
41
|
self._basic = DeviceClassItem(**data["basic"])
|
44
42
|
self._generic = DeviceClassItem(**data["generic"])
|
45
43
|
self._specific = DeviceClassItem(**data["specific"])
|
46
|
-
self._mandatory_supported_ccs: list[int] = data["mandatorySupportedCCs"]
|
47
|
-
self._mandatory_controlled_ccs: list[int] = data["mandatoryControlledCCs"]
|
48
44
|
|
49
45
|
@property
|
50
46
|
def basic(self) -> DeviceClassItem:
|
@@ -60,13 +56,3 @@ class DeviceClass:
|
|
60
56
|
def specific(self) -> DeviceClassItem:
|
61
57
|
"""Return specific DeviceClass."""
|
62
58
|
return self._specific
|
63
|
-
|
64
|
-
@property
|
65
|
-
def mandatory_supported_ccs(self) -> list[int]:
|
66
|
-
"""Return list of mandatory Supported CC id's."""
|
67
|
-
return self._mandatory_supported_ccs
|
68
|
-
|
69
|
-
@property
|
70
|
-
def mandatory_controlled_ccs(self) -> list[int]:
|
71
|
-
"""Return list of mandatory Controlled CC id's."""
|
72
|
-
return self._mandatory_controlled_ccs
|
@@ -15,15 +15,11 @@ from ...const import (
|
|
15
15
|
DateAndTime,
|
16
16
|
NodeStatus,
|
17
17
|
PowerLevel,
|
18
|
+
Protocols,
|
18
19
|
SecurityClass,
|
19
20
|
)
|
20
21
|
from ...event import Event, EventBase
|
21
|
-
from ...exceptions import
|
22
|
-
FailedCommand,
|
23
|
-
NotFoundError,
|
24
|
-
UnparseableValue,
|
25
|
-
UnwriteableValue,
|
26
|
-
)
|
22
|
+
from ...exceptions import NotFoundError, UnparseableValue, UnwriteableValue
|
27
23
|
from ..command_class import CommandClassInfo
|
28
24
|
from ..device_class import DeviceClass
|
29
25
|
from ..device_config import DeviceConfig
|
@@ -49,7 +45,6 @@ from ..value import (
|
|
49
45
|
ValueMetadata,
|
50
46
|
ValueNotification,
|
51
47
|
_get_value_id_str_from_dict,
|
52
|
-
_init_value,
|
53
48
|
)
|
54
49
|
from .data_model import NodeDataType
|
55
50
|
from .event_model import NODE_EVENT_MODEL_MAP
|
@@ -138,6 +133,12 @@ class Node(EventBase):
|
|
138
133
|
self.client.driver == other.client.driver and self.node_id == other.node_id
|
139
134
|
)
|
140
135
|
|
136
|
+
def _init_value(self, val: ValueDataType) -> Value | ConfigurationValue:
|
137
|
+
"""Initialize a Value object from ValueDataType."""
|
138
|
+
if val["commandClass"] == CommandClass.CONFIGURATION:
|
139
|
+
return ConfigurationValue(self, val)
|
140
|
+
return Value(self, val)
|
141
|
+
|
141
142
|
@property
|
142
143
|
def node_id(self) -> int:
|
143
144
|
"""Return node ID property."""
|
@@ -371,6 +372,13 @@ class Node(EventBase):
|
|
371
372
|
"""Return the default transition duration."""
|
372
373
|
return self.data.get("defaultTransitionDuration")
|
373
374
|
|
375
|
+
@property
|
376
|
+
def protocol(self) -> Protocols | None:
|
377
|
+
"""Return the protocol used to communicate with this node."""
|
378
|
+
if "protocol" in self.data:
|
379
|
+
return Protocols(self.data["protocol"])
|
380
|
+
return None
|
381
|
+
|
374
382
|
def _update_endpoints(self, endpoints: list[EndpointDataType]) -> None:
|
375
383
|
"""Update the endpoints data."""
|
376
384
|
new_endpoints_data = {endpoint["index"]: endpoint for endpoint in endpoints}
|
@@ -421,7 +429,7 @@ class Node(EventBase):
|
|
421
429
|
if value_id in self.values:
|
422
430
|
self.values[value_id].update(val)
|
423
431
|
else:
|
424
|
-
self.values[value_id] = _init_value(
|
432
|
+
self.values[value_id] = self._init_value(val)
|
425
433
|
except UnparseableValue:
|
426
434
|
# If we can't parse the value, don't store it
|
427
435
|
pass
|
@@ -440,8 +448,9 @@ class Node(EventBase):
|
|
440
448
|
)
|
441
449
|
if last_seen := data.get("lastSeen"):
|
442
450
|
self._last_seen = datetime.fromisoformat(last_seen)
|
443
|
-
if not self._statistics.last_seen:
|
451
|
+
if not self._statistics.last_seen and self.last_seen:
|
444
452
|
self._statistics.last_seen = self.last_seen
|
453
|
+
self._statistics.data["lastSeen"] = self.last_seen.isoformat()
|
445
454
|
|
446
455
|
self._update_values(self.data.pop("values"))
|
447
456
|
self._update_endpoints(self.data.pop("endpoints"))
|
@@ -585,12 +594,9 @@ class Node(EventBase):
|
|
585
594
|
data = await self.async_send_command(
|
586
595
|
"get_defined_value_ids", wait_for_result=True
|
587
596
|
)
|
588
|
-
|
589
|
-
if data is None:
|
590
|
-
# We should never reach this code
|
591
|
-
raise FailedCommand("Command failed", "failed_command")
|
597
|
+
assert data
|
592
598
|
return [
|
593
|
-
_init_value(
|
599
|
+
self._init_value(cast(ValueDataType, value_id))
|
594
600
|
for value_id in data["valueIds"]
|
595
601
|
]
|
596
602
|
|
@@ -1053,7 +1059,7 @@ class Node(EventBase):
|
|
1053
1059
|
value_id = _get_value_id_str_from_dict(self, evt_val_data)
|
1054
1060
|
value = self.values.get(value_id)
|
1055
1061
|
if value is None:
|
1056
|
-
value = _init_value(
|
1062
|
+
value = self._init_value(evt_val_data)
|
1057
1063
|
self.values[value.value_id] = event.data["value"] = value
|
1058
1064
|
else:
|
1059
1065
|
value.receive_event(event)
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/value.py
RENAMED
@@ -8,7 +8,6 @@ from typing import TYPE_CHECKING, Any, TypedDict
|
|
8
8
|
|
9
9
|
from ..const import (
|
10
10
|
VALUE_UNKNOWN,
|
11
|
-
CommandClass,
|
12
11
|
CommandStatus,
|
13
12
|
ConfigurationValueType,
|
14
13
|
SetValueStatus,
|
@@ -75,13 +74,6 @@ class ValueDataType(TypedDict, total=False):
|
|
75
74
|
ccVersion: int # required
|
76
75
|
|
77
76
|
|
78
|
-
def _init_value(node: Node, val: ValueDataType) -> Value | ConfigurationValue:
|
79
|
-
"""Initialize a Value object from ValueDataType."""
|
80
|
-
if val["commandClass"] == CommandClass.CONFIGURATION:
|
81
|
-
return ConfigurationValue(node, val)
|
82
|
-
return Value(node, val)
|
83
|
-
|
84
|
-
|
85
77
|
def _get_value_id_str_from_dict(node: Node, val: ValueDataType) -> str:
|
86
78
|
"""Return string ID of value from ValueDataType dict."""
|
87
79
|
return get_value_id_str(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: zwave-js-server-python
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.57.0
|
4
4
|
Summary: Python wrapper for zwave-js-server
|
5
5
|
Author-email: Home Assistant Team <hello@home-assistant.io>
|
6
6
|
License: Apache License
|
@@ -212,9 +212,9 @@ Classifier: Development Status :: 4 - Beta
|
|
212
212
|
Classifier: Intended Audience :: Developers
|
213
213
|
Classifier: Natural Language :: English
|
214
214
|
Classifier: Programming Language :: Python :: 3
|
215
|
-
Classifier: Programming Language :: Python :: 3.
|
215
|
+
Classifier: Programming Language :: Python :: 3.12
|
216
216
|
Classifier: Topic :: Home Automation
|
217
|
-
Requires-Python: >=3.
|
217
|
+
Requires-Python: >=3.12
|
218
218
|
Description-Content-Type: text/markdown
|
219
219
|
License-File: LICENSE
|
220
220
|
Requires-Dist: aiohttp>3
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/exceptions.py
RENAMED
File without changes
|
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/__init__.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/association.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/driver.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/duration.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/endpoint.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/log_config.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/log_message.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/statistics.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/utils.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/model/version.py
RENAMED
File without changes
|
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/helpers.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/lock.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/multicast.py
RENAMED
File without changes
|
{zwave_js_server_python-0.55.4 → zwave_js_server_python-0.57.0}/zwave_js_server/util/node.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|