Bump zwave-js-server-python to 0.41.0 (#76903)

pull/76378/head^2
Raman Gupta 2022-08-27 21:27:41 -04:00 committed by GitHub
parent 7f1a203721
commit eab0ff5185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 12 deletions

View File

@ -11,6 +11,7 @@ import voluptuous as vol
from zwave_js_server.client import Client
from zwave_js_server.const import (
CommandClass,
ExclusionStrategy,
InclusionStrategy,
LogLevel,
Protocols,
@ -153,7 +154,7 @@ STATUS = "status"
REQUESTED_SECURITY_CLASSES = "requested_security_classes"
FEATURE = "feature"
UNPROVISION = "unprovision"
STRATEGY = "strategy"
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/security/QR.ts#L41
MINIMUM_QR_STRING_LENGTH = 52
@ -480,12 +481,12 @@ async def websocket_network_status(
"sdk_version": controller.sdk_version,
"type": controller.controller_type,
"own_node_id": controller.own_node_id,
"is_secondary": controller.is_secondary,
"is_primary": controller.is_primary,
"is_using_home_id_from_other_network": controller.is_using_home_id_from_other_network,
"is_sis_present": controller.is_SIS_present,
"was_real_primary": controller.was_real_primary,
"is_static_update_controller": controller.is_static_update_controller,
"is_slave": controller.is_slave,
"is_suc": controller.is_suc,
"node_type": controller.node_type,
"firmware_version": controller.firmware_version,
"manufacturer_id": controller.manufacturer_id,
"product_id": controller.product_id,
@ -1056,7 +1057,7 @@ async def websocket_stop_exclusion(
{
vol.Required(TYPE): "zwave_js/remove_node",
vol.Required(ENTRY_ID): str,
vol.Optional(UNPROVISION): bool,
vol.Optional(STRATEGY): vol.Coerce(ExclusionStrategy),
}
)
@websocket_api.async_response
@ -1106,7 +1107,7 @@ async def websocket_remove_node(
controller.on("node removed", node_removed),
]
result = await controller.async_begin_exclusion(msg.get(UNPROVISION))
result = await controller.async_begin_exclusion(msg.get(STRATEGY))
connection.send_result(
msg[ID],
result,

View File

@ -3,7 +3,7 @@
"name": "Z-Wave",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/zwave_js",
"requirements": ["pyserial==3.5", "zwave-js-server-python==0.40.0"],
"requirements": ["pyserial==3.5", "zwave-js-server-python==0.41.0"],
"codeowners": ["@home-assistant/z-wave"],
"dependencies": ["usb", "http", "websocket_api"],
"iot_class": "local_push",

View File

@ -2575,7 +2575,7 @@ zigpy==0.50.2
zm-py==0.5.2
# homeassistant.components.zwave_js
zwave-js-server-python==0.40.0
zwave-js-server-python==0.41.0
# homeassistant.components.zwave_me
zwave_me_ws==0.2.4

View File

@ -1761,7 +1761,7 @@ zigpy-znp==0.8.2
zigpy==0.50.2
# homeassistant.components.zwave_js
zwave-js-server-python==0.40.0
zwave-js-server-python==0.41.0
# homeassistant.components.zwave_me
zwave_me_ws==0.2.4

View File

@ -6,6 +6,7 @@ from unittest.mock import patch
import pytest
from zwave_js_server.const import (
ExclusionStrategy,
InclusionState,
InclusionStrategy,
LogLevel,
@ -68,8 +69,8 @@ from homeassistant.components.zwave_js.api import (
SECURITY_CLASSES,
SPECIFIC_DEVICE_CLASS,
STATUS,
STRATEGY,
TYPE,
UNPROVISION,
VALUE,
VERSION,
)
@ -1528,7 +1529,7 @@ async def test_remove_node(
ID: 2,
TYPE: "zwave_js/remove_node",
ENTRY_ID: entry.entry_id,
UNPROVISION: True,
STRATEGY: ExclusionStrategy.EXCLUDE_ONLY,
}
)
@ -1538,7 +1539,7 @@ async def test_remove_node(
assert len(client.async_send_command.call_args_list) == 1
assert client.async_send_command.call_args[0][0] == {
"command": "controller.begin_exclusion",
"unprovision": True,
"strategy": 0,
}
# Test FailedZWaveCommand is caught