diff --git a/homeassistant/components/vesync/binary_sensor.py b/homeassistant/components/vesync/binary_sensor.py index 87e7b90da56d..b908b149953c 100644 --- a/homeassistant/components/vesync/binary_sensor.py +++ b/homeassistant/components/vesync/binary_sensor.py @@ -64,7 +64,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -78,7 +78,11 @@ async def async_setup_entry( @callback -def _setup_entities(devices, async_add_entities, coordinator): +def _setup_entities( + devices: list[VeSyncBaseDevice], + async_add_entities: AddConfigEntryEntitiesCallback, + coordinator: VeSyncDataCoordinator, +) -> None: """Add entity.""" async_add_entities( ( diff --git a/homeassistant/components/vesync/fan.py b/homeassistant/components/vesync/fan.py index 3d0dd4a2adc2..f74f99effec2 100644 --- a/homeassistant/components/vesync/fan.py +++ b/homeassistant/components/vesync/fan.py @@ -50,7 +50,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -66,9 +66,9 @@ async def async_setup_entry( @callback def _setup_entities( devices: list[VeSyncBaseDevice], - async_add_entities, + async_add_entities: AddConfigEntryEntitiesCallback, coordinator: VeSyncDataCoordinator, -): +) -> None: """Check if device is fan and add entity.""" async_add_entities( diff --git a/homeassistant/components/vesync/humidifier.py b/homeassistant/components/vesync/humidifier.py index 5d70b5d8f9a9..2dc9db3d91e8 100644 --- a/homeassistant/components/vesync/humidifier.py +++ b/homeassistant/components/vesync/humidifier.py @@ -53,7 +53,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -73,7 +73,7 @@ def _setup_entities( devices: list[VeSyncBaseDevice], async_add_entities: AddConfigEntryEntitiesCallback, coordinator: VeSyncDataCoordinator, -): +) -> None: """Add humidifier entities.""" async_add_entities(VeSyncHumidifierHA(dev, coordinator) for dev in devices) diff --git a/homeassistant/components/vesync/light.py b/homeassistant/components/vesync/light.py index 1e5ce3027cf4..90090344e7bc 100644 --- a/homeassistant/components/vesync/light.py +++ b/homeassistant/components/vesync/light.py @@ -38,7 +38,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -54,9 +54,9 @@ async def async_setup_entry( @callback def _setup_entities( devices: list[VeSyncBaseDevice], - async_add_entities, + async_add_entities: AddConfigEntryEntitiesCallback, coordinator: VeSyncDataCoordinator, -): +) -> None: """Check if device is a light and add entity.""" entities: list[VeSyncBaseLightHA] = [] for dev in devices: diff --git a/homeassistant/components/vesync/number.py b/homeassistant/components/vesync/number.py index c5716843a457..aba4f9eb48d2 100644 --- a/homeassistant/components/vesync/number.py +++ b/homeassistant/components/vesync/number.py @@ -61,7 +61,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -79,7 +79,7 @@ def _setup_entities( devices: list[VeSyncBaseDevice], async_add_entities: AddConfigEntryEntitiesCallback, coordinator: VeSyncDataCoordinator, -): +) -> None: """Add number entities.""" async_add_entities( diff --git a/homeassistant/components/vesync/select.py b/homeassistant/components/vesync/select.py index e34d13babf0e..b9a6d0a84acc 100644 --- a/homeassistant/components/vesync/select.py +++ b/homeassistant/components/vesync/select.py @@ -115,7 +115,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -133,7 +133,7 @@ def _setup_entities( devices: list[VeSyncBaseDevice], async_add_entities: AddConfigEntryEntitiesCallback, coordinator: VeSyncDataCoordinator, -): +) -> None: """Add select entities.""" async_add_entities( diff --git a/homeassistant/components/vesync/sensor.py b/homeassistant/components/vesync/sensor.py index 3d459795a041..495a6b91c59a 100644 --- a/homeassistant/components/vesync/sensor.py +++ b/homeassistant/components/vesync/sensor.py @@ -162,7 +162,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -180,7 +180,7 @@ def _setup_entities( devices: list[VeSyncBaseDevice], async_add_entities: AddConfigEntryEntitiesCallback, coordinator: VeSyncDataCoordinator, -): +) -> None: """Check if device is online and add entity.""" async_add_entities( diff --git a/homeassistant/components/vesync/switch.py b/homeassistant/components/vesync/switch.py index d29654a6590d..14fe571d643a 100644 --- a/homeassistant/components/vesync/switch.py +++ b/homeassistant/components/vesync/switch.py @@ -77,7 +77,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator) @@ -93,9 +93,9 @@ async def async_setup_entry( @callback def _setup_entities( devices: list[VeSyncBaseDevice], - async_add_entities, + async_add_entities: AddConfigEntryEntitiesCallback, coordinator: VeSyncDataCoordinator, -): +) -> None: """Check if device is online and add entity.""" async_add_entities( VeSyncSwitchEntity(dev, description, coordinator) diff --git a/homeassistant/components/vesync/update.py b/homeassistant/components/vesync/update.py index 433da715d5fd..d405ac4532b9 100644 --- a/homeassistant/components/vesync/update.py +++ b/homeassistant/components/vesync/update.py @@ -22,7 +22,7 @@ async def async_setup_entry( coordinator = hass.data[DOMAIN][VS_COORDINATOR] @callback - def discover(devices): + def discover(devices: list[VeSyncBaseDevice]) -> None: """Add new devices to platform.""" _setup_entities(devices, async_add_entities, coordinator)