diff --git a/homeassistant/components/sensor/swiss_public_transport.py b/homeassistant/components/sensor/swiss_public_transport.py index 5edb49870a1..d74053417fe 100644 --- a/homeassistant/components/sensor/swiss_public_transport.py +++ b/homeassistant/components/sensor/swiss_public_transport.py @@ -23,6 +23,7 @@ ATTR_DEPARTURE_TIME2 = 'Next on departure' ATTR_START = 'Start' ATTR_TARGET = 'Destination' ATTR_REMAINING_TIME = 'Remaining time' +ICON = 'mdi:bus' # Return cached results if last scan was less then this time ago MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=60) @@ -86,6 +87,11 @@ class SwissPublicTransportSensor(Entity): ':'.join(str(self._times[2]).split(':')[:2])) } + @property + def icon(self): + """ Icon to use in the frontend, if any. """ + return ICON + # pylint: disable=too-many-branches def update(self): """ Gets the latest data from opendata.ch and updates the states. """