Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/onvif/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
CONF_PORT,
CONF_USERNAME,
)
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback

from .const import CONF_DEVICE_ID, DEFAULT_ARGUMENTS, DEFAULT_PORT, DOMAIN, LOGGER
from .device import get_device
Expand All @@ -45,7 +45,7 @@ def wsdiscovery() -> list[Service]:
return services


async def async_discovery(hass) -> list[dict[str, Any]]:
async def async_discovery(hass: HomeAssistant) -> list[dict[str, Any]]:
"""Return if there are devices that can be discovered."""
LOGGER.debug("Starting ONVIF discovery")
services = await hass.async_add_executor_job(wsdiscovery)
Expand Down
8 changes: 7 additions & 1 deletion homeassistant/components/onvif/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,13 @@ async def async_set_imaging_settings(
LOGGER.error("Error trying to set Imaging settings: %s", err)


def get_device(hass, host, port, username, password) -> ONVIFCamera:
def get_device(
hass: HomeAssistant,
host: str,
port: int,
username: str | None,
password: str | None,
) -> ONVIFCamera:
"""Get ONVIFCamera instance."""
return ONVIFCamera(
host,
Expand Down