Adjust setup type hints in opnsense (#72225)

pull/72344/head
epenet 2022-05-23 04:46:46 +02:00 committed by GitHub
parent 4e4c745c4f
commit e9ffcad4d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1,10 +1,12 @@
"""Device tracker support for OPNSense routers.""" """Device tracker support for OPNSense routers."""
from homeassistant.components.device_tracker import DeviceScanner from homeassistant.components.device_tracker import DeviceScanner
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType
from . import CONF_TRACKER_INTERFACE, OPNSENSE_DATA from . import CONF_TRACKER_INTERFACE, OPNSENSE_DATA
async def async_get_scanner(hass, config, discovery_info=None): async def async_get_scanner(hass: HomeAssistant, config: ConfigType) -> DeviceScanner:
"""Configure the OPNSense device_tracker.""" """Configure the OPNSense device_tracker."""
interface_client = hass.data[OPNSENSE_DATA]["interfaces"] interface_client = hass.data[OPNSENSE_DATA]["interfaces"]
scanner = OPNSenseDeviceScanner( scanner = OPNSenseDeviceScanner(