Improve mikrotik error handling (#106244)

* improve mikrotik error handling

* switch to debug

* fix mock command arguments

* add recommendations

---------

Co-authored-by: Marco98 <Marco98@users.noreply.github.com>
This commit is contained in:
Marco 2023-12-23 16:26:27 +01:00 committed by GitHub
parent 0af850cbb6
commit d450a7f57e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 14 deletions

View file

@ -52,7 +52,9 @@ def mock_device_registry_devices(hass: HomeAssistant) -> None:
)
def mock_command(self, cmd: str, params: dict[str, Any] | None = None) -> Any:
def mock_command(
self, cmd: str, params: dict[str, Any] | None = None, suppress_errors: bool = False
) -> Any:
"""Mock the Mikrotik command method."""
if cmd == mikrotik.const.MIKROTIK_SERVICES[mikrotik.const.IS_WIRELESS]:
return True