From 76ba3afeae07a11da26d74d453f8bdfd0078b659 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:33:40 +0100 Subject: [PATCH] Cleanup dead code in renault (#132172) --- homeassistant/components/renault/coordinator.py | 2 +- homeassistant/components/renault/entity.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/renault/coordinator.py b/homeassistant/components/renault/coordinator.py index 988349e76f4..89e62867130 100644 --- a/homeassistant/components/renault/coordinator.py +++ b/homeassistant/components/renault/coordinator.py @@ -18,7 +18,7 @@ from renault_api.kamereon.models import KamereonVehicleDataAttributes from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed -T = TypeVar("T", bound=KamereonVehicleDataAttributes | None) +T = TypeVar("T", bound=KamereonVehicleDataAttributes) # We have potentially 7 coordinators per vehicle _PARALLEL_SEMAPHORE = asyncio.Semaphore(1) diff --git a/homeassistant/components/renault/entity.py b/homeassistant/components/renault/entity.py index c7f83c1e6f2..7beb91e9603 100644 --- a/homeassistant/components/renault/entity.py +++ b/homeassistant/components/renault/entity.py @@ -59,6 +59,4 @@ class RenaultDataEntity( def _get_data_attr(self, key: str) -> StateType: """Return the attribute value from the coordinator data.""" - if self.coordinator.data is None: - return None return cast(StateType, getattr(self.coordinator.data, key))