Automatically enable/disable zwave_js server logging in lib (#100837)

* Bump zwave-js-server-python to 0.52.0

* Add WS command to enabled zwave_js server logging in lib

* enable and disable server logging automatically

* fix conditionals

* fix tests

* Add logging

* small tweaks

* Add logger as a dependency

* fix test

* Prepare for movement of event constant

* Add constant so tests pass
This commit is contained in:
Raman Gupta 2023-09-27 01:17:52 -04:00 committed by GitHub
parent 067b94899f
commit 70e3da207a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 200 additions and 12 deletions

View file

@ -126,12 +126,14 @@ async def test_network_status(
hass: HomeAssistant,
multisensor_6,
controller_state,
client,
integration,
hass_ws_client: WebSocketGenerator,
) -> None:
"""Test the network status websocket command."""
entry = integration
ws_client = await hass_ws_client(hass)
client.server_logging_enabled = False
# Try API call with entry ID
with patch(
@ -150,6 +152,7 @@ async def test_network_status(
assert result["client"]["ws_server_url"] == "ws://test:3000/zjs"
assert result["client"]["server_version"] == "1.0.0"
assert not result["client"]["server_logging_enabled"]
assert result["controller"]["inclusion_state"] == InclusionState.IDLE
# Try API call with device ID