From d878d744e7b56de8465be1ffeaf22f79b245a0a2 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 31 Jul 2024 20:50:31 +0200 Subject: [PATCH] Fix implicit-return in irish_rail_transport (#122916) --- homeassistant/components/irish_rail_transport/sensor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/irish_rail_transport/sensor.py b/homeassistant/components/irish_rail_transport/sensor.py index a96846558fa..39bf39bcbe0 100644 --- a/homeassistant/components/irish_rail_transport/sensor.py +++ b/homeassistant/components/irish_rail_transport/sensor.py @@ -3,6 +3,7 @@ from __future__ import annotations from datetime import timedelta +from typing import Any from pyirishrail.pyirishrail import IrishRailRTPI import voluptuous as vol @@ -104,7 +105,7 @@ class IrishRailTransportSensor(SensorEntity): return self._state @property - def extra_state_attributes(self): + def extra_state_attributes(self) -> dict[str, Any] | None: """Return the state attributes.""" if self._times: next_up = "None" @@ -127,6 +128,7 @@ class IrishRailTransportSensor(SensorEntity): ATTR_NEXT_UP: next_up, ATTR_TRAIN_TYPE: self._times[0][ATTR_TRAIN_TYPE], } + return None @property def native_unit_of_measurement(self):