mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Add ONVIF services to diagnostics (#92878)
This commit is contained in:
parent
c14efef582
commit
8b57d31eba
@ -27,6 +27,10 @@ async def async_get_config_entry_diagnostics(
|
||||
"info": asdict(device.info),
|
||||
"capabilities": asdict(device.capabilities),
|
||||
"profiles": [asdict(profile) for profile in device.profiles],
|
||||
"services": {
|
||||
str(key): service.url for key, service in device.device.services.items()
|
||||
},
|
||||
"xaddrs": device.device.xaddrs,
|
||||
}
|
||||
data["events"] = {
|
||||
"webhook_manager_state": device.events.webhook_manager.state,
|
||||
|
@ -101,6 +101,8 @@ def setup_mock_onvif_camera(
|
||||
mock_onvif_camera.create_devicemgmt_service = AsyncMock(return_value=devicemgmt)
|
||||
mock_onvif_camera.create_media_service = AsyncMock(return_value=media_service)
|
||||
mock_onvif_camera.close = AsyncMock(return_value=None)
|
||||
mock_onvif_camera.xaddrs = {}
|
||||
mock_onvif_camera.services = {}
|
||||
|
||||
def mock_constructor(
|
||||
host,
|
||||
|
@ -1,4 +1,6 @@
|
||||
"""Test ONVIF diagnostics."""
|
||||
from unittest.mock import ANY
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from . import (
|
||||
@ -71,6 +73,8 @@ async def test_diagnostics(
|
||||
"video_source_token": None,
|
||||
}
|
||||
],
|
||||
"services": ANY,
|
||||
"xaddrs": ANY,
|
||||
},
|
||||
"events": {
|
||||
"pullpoint_manager_state": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user