diff --git a/homeassistant/components/oncue/binary_sensor.py b/homeassistant/components/oncue/binary_sensor.py index 8ea637377b0..ec4eb1e6c84 100644 --- a/homeassistant/components/oncue/binary_sensor.py +++ b/homeassistant/components/oncue/binary_sensor.py @@ -34,9 +34,11 @@ async def async_setup_entry( async_add_entities: AddEntitiesCallback, ) -> None: """Set up sensors.""" - coordinator: DataUpdateCoordinator = hass.data[DOMAIN][config_entry.entry_id] + coordinator: DataUpdateCoordinator[dict[str, OncueDevice]] = hass.data[DOMAIN][ + config_entry.entry_id + ] entities: list[OncueBinarySensorEntity] = [] - devices: dict[str, OncueDevice] = coordinator.data + devices = coordinator.data for device_id, device in devices.items(): entities.extend( OncueBinarySensorEntity( diff --git a/homeassistant/components/oncue/entity.py b/homeassistant/components/oncue/entity.py index 60a3826df42..f29caa2363b 100644 --- a/homeassistant/components/oncue/entity.py +++ b/homeassistant/components/oncue/entity.py @@ -14,12 +14,14 @@ from homeassistant.helpers.update_coordinator import ( from .const import CONNECTION_ESTABLISHED_KEY, DOMAIN, VALUE_UNAVAILABLE -class OncueEntity(CoordinatorEntity, Entity): +class OncueEntity( + CoordinatorEntity[DataUpdateCoordinator[dict[str, OncueDevice]]], Entity +): """Representation of an Oncue entity.""" def __init__( self, - coordinator: DataUpdateCoordinator, + coordinator: DataUpdateCoordinator[dict[str, OncueDevice]], device_id: str, device: OncueDevice, sensor: OncueSensor, diff --git a/homeassistant/components/oncue/sensor.py b/homeassistant/components/oncue/sensor.py index 0a7f8910775..01d8cb28441 100644 --- a/homeassistant/components/oncue/sensor.py +++ b/homeassistant/components/oncue/sensor.py @@ -183,9 +183,11 @@ async def async_setup_entry( async_add_entities: AddEntitiesCallback, ) -> None: """Set up sensors.""" - coordinator: DataUpdateCoordinator = hass.data[DOMAIN][config_entry.entry_id] + coordinator: DataUpdateCoordinator[dict[str, OncueDevice]] = hass.data[DOMAIN][ + config_entry.entry_id + ] entities: list[OncueSensorEntity] = [] - devices: dict[str, OncueDevice] = coordinator.data + devices = coordinator.data for device_id, device in devices.items(): entities.extend( OncueSensorEntity(coordinator, device_id, device, sensor, SENSOR_MAP[key]) @@ -201,7 +203,7 @@ class OncueSensorEntity(OncueEntity, SensorEntity): def __init__( self, - coordinator: DataUpdateCoordinator, + coordinator: DataUpdateCoordinator[dict[str, OncueDevice]], device_id: str, device: OncueDevice, sensor: OncueSensor,