Migrate Trafikverket Train to new entity naming style (#75208)

This commit is contained in:
G Johansson 2022-09-19 16:11:39 +02:00 committed by GitHub
parent 8cc0c4dbba
commit acf8bfb299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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