mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 11:29:46 +00:00
Use runtime_data in blink (#129072)
This commit is contained in:
@@ -9,7 +9,6 @@ from homeassistant.components.binary_sensor import (
|
||||
BinarySensorEntity,
|
||||
BinarySensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
@@ -23,7 +22,7 @@ from .const import (
|
||||
TYPE_CAMERA_ARMED,
|
||||
TYPE_MOTION_DETECTED,
|
||||
)
|
||||
from .coordinator import BlinkUpdateCoordinator
|
||||
from .coordinator import BlinkConfigEntry, BlinkUpdateCoordinator
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -47,11 +46,13 @@ BINARY_SENSORS_TYPES: tuple[BinarySensorEntityDescription, ...] = (
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant, config: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
hass: HomeAssistant,
|
||||
config_entry: BlinkConfigEntry,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the blink binary sensors."""
|
||||
|
||||
coordinator: BlinkUpdateCoordinator = hass.data[DOMAIN][config.entry_id]
|
||||
coordinator = config_entry.runtime_data
|
||||
|
||||
entities = [
|
||||
BlinkBinarySensor(coordinator, camera, description)
|
||||
|
||||
Reference in New Issue
Block a user