From acf8bfb299a14684abc1227cdeb9d4557f379755 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Mon, 19 Sep 2022 16:11:39 +0200 Subject: [PATCH] Migrate Trafikverket Train to new entity naming style (#75208) --- homeassistant/components/trafikverket_train/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/trafikverket_train/sensor.py b/homeassistant/components/trafikverket_train/sensor.py index d9674e5373a..8ecf0a99c31 100644 --- a/homeassistant/components/trafikverket_train/sensor.py +++ b/homeassistant/components/trafikverket_train/sensor.py @@ -93,6 +93,7 @@ class TrainSensor(SensorEntity): _attr_icon = ICON _attr_device_class = SensorDeviceClass.TIMESTAMP + _attr_has_entity_name = True def __init__( self, @@ -106,7 +107,6 @@ class TrainSensor(SensorEntity): ) -> None: """Initialize the sensor.""" self._train_api = train_api - self._attr_name = name self._from_station = from_station self._to_station = to_station self._weekday = weekday