Skip to content

Commit

Permalink
sensor.speedtest: provide a default icon (home-assistant#6207)
Browse files Browse the repository at this point in the history
  • Loading branch information
molobrakos authored and fabaff committed Feb 24, 2017
1 parent b27ba96 commit 8aa3124
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions homeassistant/components/sensor/speedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
CONF_SERVER_ID = 'server_id'
CONF_MANUAL = 'manual'

ICON = 'mdi:speedometer'

SENSOR_TYPES = {
'ping': ['Ping', 'ms'],
'download': ['Download', 'Mbit/s'],
Expand Down Expand Up @@ -103,6 +105,11 @@ def unit_of_measurement(self):
"""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
Expand Down

0 comments on commit 8aa3124

Please sign in to comment.