renaming icons (#13982)

* renaming icons

* remove mdi:robot-vacuum

* fix other vacuums
This commit is contained in:
NovapaX 2018-04-18 21:46:44 +02:00 committed by Paulus Schoutsen
parent 0eb3e49880
commit 45eb611007
9 changed files with 3 additions and 43 deletions

View File

@ -35,7 +35,7 @@ CONF_TYPES = 'types'
ICON_UNKNOWN = 'mdi:help' ICON_UNKNOWN = 'mdi:help'
ICON_AUDIO = 'mdi:speaker' ICON_AUDIO = 'mdi:speaker'
ICON_PLAYER = 'mdi:play' ICON_PLAYER = 'mdi:play'
ICON_TUNER = 'mdi:nest-thermostat' ICON_TUNER = 'mdi:radio'
ICON_RECORDER = 'mdi:microphone' ICON_RECORDER = 'mdi:microphone'
ICON_TV = 'mdi:television' ICON_TV = 'mdi:television'
ICONS_BY_TYPE = { ICONS_BY_TYPE = {

View File

@ -76,7 +76,6 @@ SERVICE_TO_METHOD = {
} }
DEFAULT_NAME = 'Vacuum cleaner robot' DEFAULT_NAME = 'Vacuum cleaner robot'
DEFAULT_ICON = 'mdi:roomba'
SUPPORT_TURN_ON = 1 SUPPORT_TURN_ON = 1
SUPPORT_TURN_OFF = 2 SUPPORT_TURN_OFF = 2

View File

@ -7,7 +7,7 @@ https://home-assistant.io/components/demo/
import logging import logging
from homeassistant.components.vacuum import ( from homeassistant.components.vacuum import (
ATTR_CLEANED_AREA, DEFAULT_ICON, SUPPORT_BATTERY, SUPPORT_CLEAN_SPOT, ATTR_CLEANED_AREA, SUPPORT_BATTERY, SUPPORT_CLEAN_SPOT,
SUPPORT_FAN_SPEED, SUPPORT_LOCATE, SUPPORT_PAUSE, SUPPORT_RETURN_HOME, SUPPORT_FAN_SPEED, SUPPORT_LOCATE, SUPPORT_PAUSE, SUPPORT_RETURN_HOME,
SUPPORT_SEND_COMMAND, SUPPORT_STATUS, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_SEND_COMMAND, SUPPORT_STATUS, SUPPORT_STOP, SUPPORT_TURN_OFF,
SUPPORT_TURN_ON, VacuumDevice) SUPPORT_TURN_ON, VacuumDevice)
@ -66,11 +66,6 @@ class DemoVacuum(VacuumDevice):
"""Return the name of the vacuum.""" """Return the name of the vacuum."""
return self._name return self._name
@property
def icon(self):
"""Return the icon for the vacuum."""
return DEFAULT_ICON
@property @property
def should_poll(self): def should_poll(self):
"""No polling needed for a demo vacuum.""" """No polling needed for a demo vacuum."""

View File

@ -24,8 +24,6 @@ DEPENDENCIES = ['dyson']
DYSON_360_EYE_DEVICES = "dyson_360_eye_devices" DYSON_360_EYE_DEVICES = "dyson_360_eye_devices"
ICON = 'mdi:roomba'
SUPPORT_DYSON = SUPPORT_TURN_ON | SUPPORT_TURN_OFF | SUPPORT_PAUSE | \ SUPPORT_DYSON = SUPPORT_TURN_ON | SUPPORT_TURN_OFF | SUPPORT_PAUSE | \
SUPPORT_RETURN_HOME | SUPPORT_FAN_SPEED | SUPPORT_STATUS | \ SUPPORT_RETURN_HOME | SUPPORT_FAN_SPEED | SUPPORT_STATUS | \
SUPPORT_BATTERY | SUPPORT_STOP SUPPORT_BATTERY | SUPPORT_STOP
@ -56,7 +54,6 @@ class Dyson360EyeDevice(VacuumDevice):
"""Dyson 360 Eye robot vacuum device.""" """Dyson 360 Eye robot vacuum device."""
_LOGGER.debug("Creating device %s", device.name) _LOGGER.debug("Creating device %s", device.name)
self._device = device self._device = device
self._icon = ICON
@asyncio.coroutine @asyncio.coroutine
def async_added_to_hass(self): def async_added_to_hass(self):
@ -82,11 +79,6 @@ class Dyson360EyeDevice(VacuumDevice):
"""Return the name of the device.""" """Return the name of the device."""
return self._device.name return self._device.name
@property
def icon(self):
"""Return the icon to use for device."""
return self._icon
@property @property
def status(self): def status(self):
"""Return the status of the vacuum cleaner.""" """Return the status of the vacuum cleaner."""

View File

@ -12,7 +12,7 @@ import voluptuous as vol
import homeassistant.components.mqtt as mqtt import homeassistant.components.mqtt as mqtt
from homeassistant.components.mqtt import MqttAvailability from homeassistant.components.mqtt import MqttAvailability
from homeassistant.components.vacuum import ( from homeassistant.components.vacuum import (
DEFAULT_ICON, SUPPORT_BATTERY, SUPPORT_CLEAN_SPOT, SUPPORT_FAN_SPEED, SUPPORT_BATTERY, SUPPORT_CLEAN_SPOT, SUPPORT_FAN_SPEED,
SUPPORT_LOCATE, SUPPORT_PAUSE, SUPPORT_RETURN_HOME, SUPPORT_SEND_COMMAND, SUPPORT_LOCATE, SUPPORT_PAUSE, SUPPORT_RETURN_HOME, SUPPORT_SEND_COMMAND,
SUPPORT_STATUS, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_STATUS, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
VacuumDevice) VacuumDevice)
@ -340,11 +340,6 @@ class MqttVacuum(MqttAvailability, VacuumDevice):
"""Return the name of the vacuum.""" """Return the name of the vacuum."""
return self._name return self._name
@property
def icon(self):
"""Return the icon for the vacuum."""
return DEFAULT_ICON
@property @property
def should_poll(self): def should_poll(self):
"""No polling needed for an MQTT vacuum.""" """No polling needed for an MQTT vacuum."""

View File

@ -24,8 +24,6 @@ SUPPORT_NEATO = SUPPORT_BATTERY | SUPPORT_PAUSE | SUPPORT_RETURN_HOME | \
SUPPORT_STOP | SUPPORT_TURN_OFF | SUPPORT_TURN_ON | \ SUPPORT_STOP | SUPPORT_TURN_OFF | SUPPORT_TURN_ON | \
SUPPORT_STATUS | SUPPORT_MAP SUPPORT_STATUS | SUPPORT_MAP
ICON = 'mdi:roomba'
ATTR_CLEAN_START = 'clean_start' ATTR_CLEAN_START = 'clean_start'
ATTR_CLEAN_STOP = 'clean_stop' ATTR_CLEAN_STOP = 'clean_stop'
ATTR_CLEAN_AREA = 'clean_area' ATTR_CLEAN_AREA = 'clean_area'
@ -131,11 +129,6 @@ class NeatoConnectedVacuum(VacuumDevice):
"""Return the name of the device.""" """Return the name of the device."""
return self._name return self._name
@property
def icon(self):
"""Return the icon to use for device."""
return ICON
@property @property
def supported_features(self): def supported_features(self):
"""Flag vacuum cleaner robot features that are supported.""" """Flag vacuum cleaner robot features that are supported."""

View File

@ -43,7 +43,6 @@ DEFAULT_CERT = '/etc/ssl/certs/ca-certificates.crt'
DEFAULT_CONTINUOUS = True DEFAULT_CONTINUOUS = True
DEFAULT_NAME = 'Roomba' DEFAULT_NAME = 'Roomba'
ICON = 'mdi:roomba'
PLATFORM = 'roomba' PLATFORM = 'roomba'
FAN_SPEED_AUTOMATIC = 'Automatic' FAN_SPEED_AUTOMATIC = 'Automatic'
@ -165,11 +164,6 @@ class RoombaVacuum(VacuumDevice):
"""Return the name of the device.""" """Return the name of the device."""
return self._name return self._name
@property
def icon(self):
"""Return the icon to use for device."""
return ICON
@property @property
def device_state_attributes(self): def device_state_attributes(self):
"""Return the state attributes of the device.""" """Return the state attributes of the device."""

View File

@ -24,7 +24,6 @@ REQUIREMENTS = ['python-miio==0.3.9', 'construct==2.9.41']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'Xiaomi Vacuum cleaner' DEFAULT_NAME = 'Xiaomi Vacuum cleaner'
ICON = 'mdi:roomba'
DATA_KEY = 'vacuum.xiaomi_miio' DATA_KEY = 'vacuum.xiaomi_miio'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@ -142,7 +141,6 @@ class MiroboVacuum(VacuumDevice):
def __init__(self, name, vacuum): def __init__(self, name, vacuum):
"""Initialize the Xiaomi vacuum cleaner robot handler.""" """Initialize the Xiaomi vacuum cleaner robot handler."""
self._name = name self._name = name
self._icon = ICON
self._vacuum = vacuum self._vacuum = vacuum
self.vacuum_state = None self.vacuum_state = None
@ -158,11 +156,6 @@ class MiroboVacuum(VacuumDevice):
"""Return the name of the device.""" """Return the name of the device."""
return self._name return self._name
@property
def icon(self):
"""Return the icon to use for device."""
return self._icon
@property @property
def status(self): def status(self):
"""Return the status of the vacuum cleaner.""" """Return the status of the vacuum cleaner."""

View File

@ -118,7 +118,6 @@ class DysonTest(unittest.TestCase):
component3 = Dyson360EyeDevice(device3) component3 = Dyson360EyeDevice(device3)
self.assertEqual(component.name, "Device_Vacuum") self.assertEqual(component.name, "Device_Vacuum")
self.assertTrue(component.is_on) self.assertTrue(component.is_on)
self.assertEqual(component.icon, "mdi:roomba")
self.assertEqual(component.status, "Cleaning") self.assertEqual(component.status, "Cleaning")
self.assertEqual(component2.status, "Unknown") self.assertEqual(component2.status, "Unknown")
self.assertEqual(component.battery_level, 85) self.assertEqual(component.battery_level, 85)