From 511f3335a122e1925ec626aaf384ac6c9bf20913 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 27 Dec 2022 21:18:15 +0100 Subject: [PATCH] Improve `rdw` generic typing (#84643) --- homeassistant/components/rdw/binary_sensor.py | 6 ++++-- homeassistant/components/rdw/sensor.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/rdw/binary_sensor.py b/homeassistant/components/rdw/binary_sensor.py index 25ef6b27f1d..13a04515143 100644 --- a/homeassistant/components/rdw/binary_sensor.py +++ b/homeassistant/components/rdw/binary_sensor.py @@ -71,7 +71,9 @@ async def async_setup_entry( ) -class RDWBinarySensorEntity(CoordinatorEntity, BinarySensorEntity): +class RDWBinarySensorEntity( + CoordinatorEntity[DataUpdateCoordinator[Vehicle]], BinarySensorEntity +): """Defines an RDW binary sensor.""" entity_description: RDWBinarySensorEntityDescription @@ -80,7 +82,7 @@ class RDWBinarySensorEntity(CoordinatorEntity, BinarySensorEntity): def __init__( self, *, - coordinator: DataUpdateCoordinator, + coordinator: DataUpdateCoordinator[Vehicle], description: RDWBinarySensorEntityDescription, ) -> None: """Initialize RDW binary sensor.""" diff --git a/homeassistant/components/rdw/sensor.py b/homeassistant/components/rdw/sensor.py index d4cb97005a8..e262665dd63 100644 --- a/homeassistant/components/rdw/sensor.py +++ b/homeassistant/components/rdw/sensor.py @@ -72,7 +72,7 @@ async def async_setup_entry( ) -class RDWSensorEntity(CoordinatorEntity, SensorEntity): +class RDWSensorEntity(CoordinatorEntity[DataUpdateCoordinator[Vehicle]], SensorEntity): """Defines an RDW sensor.""" entity_description: RDWSensorEntityDescription @@ -81,7 +81,7 @@ class RDWSensorEntity(CoordinatorEntity, SensorEntity): def __init__( self, *, - coordinator: DataUpdateCoordinator, + coordinator: DataUpdateCoordinator[Vehicle], license_plate: str, description: RDWSensorEntityDescription, ) -> None: