sensor.speedtest: provide a default icon (#6207)
parent
b27ba9660b
commit
8aa3124aa6
|
@ -34,6 +34,8 @@ CONF_DAY = 'day'
|
|||
CONF_SERVER_ID = 'server_id'
|
||||
CONF_MANUAL = 'manual'
|
||||
|
||||
ICON = 'mdi:speedometer'
|
||||
|
||||
SENSOR_TYPES = {
|
||||
'ping': ['Ping', 'ms'],
|
||||
'download': ['Download', 'Mbit/s'],
|
||||
|
@ -103,6 +105,11 @@ class SpeedtestSensor(Entity):
|
|||
"""Return the unit of measurement of this entity, if any."""
|
||||
return self._unit_of_measurement
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return icon."""
|
||||
return ICON
|
||||
|
||||
def update(self):
|
||||
"""Get the latest data and update the states."""
|
||||
data = self.speedtest_client.data
|
||||
|
|
Loading…
Reference in New Issue