mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix mypy errors (#152879)
This commit is contained in:
@@ -4,11 +4,9 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from typing import cast
|
||||
|
||||
from aioacaia.acaiascale import AcaiaScale
|
||||
from aioacaia.exceptions import AcaiaDeviceNotFound, AcaiaError
|
||||
from bleak import BleakScanner
|
||||
|
||||
from homeassistant.components.bluetooth import async_get_scanner
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
@@ -45,7 +43,7 @@ class AcaiaCoordinator(DataUpdateCoordinator[None]):
|
||||
name=entry.title,
|
||||
is_new_style_scale=entry.data[CONF_IS_NEW_STYLE_SCALE],
|
||||
notify_callback=self.async_update_listeners,
|
||||
scanner=cast(BleakScanner, async_get_scanner(hass)),
|
||||
scanner=async_get_scanner(hass),
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
@@ -63,7 +63,7 @@ async def async_get_controller(hass: HomeAssistant) -> Controller:
|
||||
|
||||
controller = Controller(
|
||||
async_zeroconf_instance=async_zeroconf_instance,
|
||||
bleak_scanner_instance=bleak_scanner_instance, # type: ignore[arg-type]
|
||||
bleak_scanner_instance=bleak_scanner_instance,
|
||||
char_cache=char_cache,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user