Skip to content

Commit

Permalink
expose diagnostics in the client (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt authored Jan 12, 2023
1 parent 94abe95 commit 97ea445
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion matter_server/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SuccessResultMessage,
)
from ..common.models.node import MatterAttribute, MatterNode
from ..common.models.server_information import ServerInfo
from ..common.models.server_information import ServerDiagnostics, ServerInfo
from .const import MIN_SCHEMA_VERSION
from .exceptions import (
CannotConnect,
Expand Down Expand Up @@ -253,6 +253,11 @@ async def send_command_no_wait(
)
await self._send_message(message)

async def get_diagnostics(self) -> ServerDiagnostics:
"""Return a full dump of the server (for diagnostics)."""
data = await self.send_command(APICommand.SERVER_DIAGNOSTICS)
return dataclass_from_dict(ServerDiagnostics, data)

async def connect(self) -> None:
"""Connect to the websocket server."""
if self._ws_client is not None:
Expand Down

0 comments on commit 97ea445

Please sign in to comment.