diff --git a/homeassistant/components/asuswrt/sensor.py b/homeassistant/components/asuswrt/sensor.py index 631e6e9d70f5f..cbe32a1ec433b 100644 --- a/homeassistant/components/asuswrt/sensor.py +++ b/homeassistant/components/asuswrt/sensor.py @@ -10,6 +10,9 @@ _LOGGER = logging.getLogger(__name__) +UPLOAD_ICON = "mdi:upload-network" +DOWNLOAD_ICON = "mdi:download-network" + async def async_setup_platform(hass, config, add_entities, discovery_info=None): """Set up the asuswrt sensors.""" @@ -82,6 +85,11 @@ class AsuswrtRXSensor(AsuswrtSensor): _name = "Asuswrt Download Speed" _unit = DATA_RATE_MEGABITS_PER_SECOND + @property + def icon(self): + """Return the icon.""" + return DOWNLOAD_ICON + @property def unit_of_measurement(self): """Return the unit of measurement.""" @@ -100,6 +108,11 @@ class AsuswrtTXSensor(AsuswrtSensor): _name = "Asuswrt Upload Speed" _unit = DATA_RATE_MEGABITS_PER_SECOND + @property + def icon(self): + """Return the icon.""" + return UPLOAD_ICON + @property def unit_of_measurement(self): """Return the unit of measurement.""" @@ -118,6 +131,11 @@ class AsuswrtTotalRXSensor(AsuswrtSensor): _name = "Asuswrt Download" _unit = DATA_GIGABYTES + @property + def icon(self): + """Return the icon.""" + return DOWNLOAD_ICON + @property def unit_of_measurement(self): """Return the unit of measurement.""" @@ -136,6 +154,11 @@ class AsuswrtTotalTXSensor(AsuswrtSensor): _name = "Asuswrt Upload" _unit = DATA_GIGABYTES + @property + def icon(self): + """Return the icon.""" + return UPLOAD_ICON + @property def unit_of_measurement(self): """Return the unit of measurement."""