Skip to content

Commit

Permalink
Support controller.cancel_secure_bootstrap_s2
Browse files Browse the repository at this point in the history
  • Loading branch information
MindFreeze committed Nov 19, 2024
1 parent 06e888f commit 37ec060
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def version_data_fixture():
"serverVersion": "test_server_version",
"homeId": "test_home_id",
"minSchemaVersion": 0,
"maxSchemaVersion": 39,
"maxSchemaVersion": 40,
}


Expand Down
2 changes: 1 addition & 1 deletion test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ async def test_additional_user_agent_components(client_session, url):
{
"command": "initialize",
"messageId": "initialize",
"schemaVersion": 39,
"schemaVersion": 40,
"additionalUserAgentComponents": {
"zwave-js-server-python": __version__,
"foo": "bar",
Expand Down
2 changes: 1 addition & 1 deletion test/test_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async def test_dump_additional_user_agent_components(
{
"command": "initialize",
"messageId": "initialize",
"schemaVersion": 39,
"schemaVersion": 40,
"additionalUserAgentComponents": {
"zwave-js-server-python": __version__,
"foo": "bar",
Expand Down
2 changes: 1 addition & 1 deletion test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_dump_state(
assert captured.out == (
"{'type': 'version', 'driverVersion': 'test_driver_version', "
"'serverVersion': 'test_server_version', 'homeId': 'test_home_id', "
"'minSchemaVersion': 0, 'maxSchemaVersion': 39}\n"
"'minSchemaVersion': 0, 'maxSchemaVersion': 40}\n"
"{'type': 'result', 'success': True, 'result': {}, 'messageId': 'initialize'}\n"
"test_result\n"
)
Expand Down
2 changes: 1 addition & 1 deletion zwave_js_server/const/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# minimal server schema version we can handle
MIN_SERVER_SCHEMA_VERSION = 39
# max server schema version we can handle (and our code is compatible with)
MAX_SERVER_SCHEMA_VERSION = 39
MAX_SERVER_SCHEMA_VERSION = 40

VALUE_UNKNOWN = "unknown"

Expand Down
6 changes: 6 additions & 0 deletions zwave_js_server/model/controller/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ async def async_stop_inclusion(self) -> bool:
)
return cast(bool, data["success"])

async def async_cancel_secure_bootstrap_s2(self) -> None:
"""Send cancelSecureBootstrapS2 command to Controller."""
await self.client.async_send_command(
{"command": "controller.cancel_secure_bootstrap_s2"}, require_schema=40
)

async def async_begin_exclusion(
self, strategy: ExclusionStrategy | None = None
) -> bool:
Expand Down

0 comments on commit 37ec060

Please sign in to comment.