renaming icons (#13982)
* renaming icons * remove mdi:robot-vacuum * fix other vacuums
This commit is contained in:
parent
0eb3e49880
commit
45eb611007
9 changed files with 3 additions and 43 deletions
|
@ -35,7 +35,7 @@ CONF_TYPES = 'types'
|
|||
ICON_UNKNOWN = 'mdi:help'
|
||||
ICON_AUDIO = 'mdi:speaker'
|
||||
ICON_PLAYER = 'mdi:play'
|
||||
ICON_TUNER = 'mdi:nest-thermostat'
|
||||
ICON_TUNER = 'mdi:radio'
|
||||
ICON_RECORDER = 'mdi:microphone'
|
||||
ICON_TV = 'mdi:television'
|
||||
ICONS_BY_TYPE = {
|
||||
|
|
|
@ -76,7 +76,6 @@ SERVICE_TO_METHOD = {
|
|||
}
|
||||
|
||||
DEFAULT_NAME = 'Vacuum cleaner robot'
|
||||
DEFAULT_ICON = 'mdi:roomba'
|
||||
|
||||
SUPPORT_TURN_ON = 1
|
||||
SUPPORT_TURN_OFF = 2
|
||||
|
|
|
@ -7,7 +7,7 @@ https://home-assistant.io/components/demo/
|
|||
import logging
|
||||
|
||||
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_SEND_COMMAND, SUPPORT_STATUS, SUPPORT_STOP, SUPPORT_TURN_OFF,
|
||||
SUPPORT_TURN_ON, VacuumDevice)
|
||||
|
@ -66,11 +66,6 @@ class DemoVacuum(VacuumDevice):
|
|||
"""Return the name of the vacuum."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return the icon for the vacuum."""
|
||||
return DEFAULT_ICON
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed for a demo vacuum."""
|
||||
|
|
|
@ -24,8 +24,6 @@ DEPENDENCIES = ['dyson']
|
|||
|
||||
DYSON_360_EYE_DEVICES = "dyson_360_eye_devices"
|
||||
|
||||
ICON = 'mdi:roomba'
|
||||
|
||||
SUPPORT_DYSON = SUPPORT_TURN_ON | SUPPORT_TURN_OFF | SUPPORT_PAUSE | \
|
||||
SUPPORT_RETURN_HOME | SUPPORT_FAN_SPEED | SUPPORT_STATUS | \
|
||||
SUPPORT_BATTERY | SUPPORT_STOP
|
||||
|
@ -56,7 +54,6 @@ class Dyson360EyeDevice(VacuumDevice):
|
|||
"""Dyson 360 Eye robot vacuum device."""
|
||||
_LOGGER.debug("Creating device %s", device.name)
|
||||
self._device = device
|
||||
self._icon = ICON
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_added_to_hass(self):
|
||||
|
@ -82,11 +79,6 @@ class Dyson360EyeDevice(VacuumDevice):
|
|||
"""Return the name of the device."""
|
||||
return self._device.name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return the icon to use for device."""
|
||||
return self._icon
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
"""Return the status of the vacuum cleaner."""
|
||||
|
|
|
@ -12,7 +12,7 @@ import voluptuous as vol
|
|||
import homeassistant.components.mqtt as mqtt
|
||||
from homeassistant.components.mqtt import MqttAvailability
|
||||
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_STATUS, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
|
||||
VacuumDevice)
|
||||
|
@ -340,11 +340,6 @@ class MqttVacuum(MqttAvailability, VacuumDevice):
|
|||
"""Return the name of the vacuum."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return the icon for the vacuum."""
|
||||
return DEFAULT_ICON
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed for an MQTT vacuum."""
|
||||
|
|
|
@ -24,8 +24,6 @@ SUPPORT_NEATO = SUPPORT_BATTERY | SUPPORT_PAUSE | SUPPORT_RETURN_HOME | \
|
|||
SUPPORT_STOP | SUPPORT_TURN_OFF | SUPPORT_TURN_ON | \
|
||||
SUPPORT_STATUS | SUPPORT_MAP
|
||||
|
||||
ICON = 'mdi:roomba'
|
||||
|
||||
ATTR_CLEAN_START = 'clean_start'
|
||||
ATTR_CLEAN_STOP = 'clean_stop'
|
||||
ATTR_CLEAN_AREA = 'clean_area'
|
||||
|
@ -131,11 +129,6 @@ class NeatoConnectedVacuum(VacuumDevice):
|
|||
"""Return the name of the device."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return the icon to use for device."""
|
||||
return ICON
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Flag vacuum cleaner robot features that are supported."""
|
||||
|
|
|
@ -43,7 +43,6 @@ DEFAULT_CERT = '/etc/ssl/certs/ca-certificates.crt'
|
|||
DEFAULT_CONTINUOUS = True
|
||||
DEFAULT_NAME = 'Roomba'
|
||||
|
||||
ICON = 'mdi:roomba'
|
||||
PLATFORM = 'roomba'
|
||||
|
||||
FAN_SPEED_AUTOMATIC = 'Automatic'
|
||||
|
@ -165,11 +164,6 @@ class RoombaVacuum(VacuumDevice):
|
|||
"""Return the name of the device."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return the icon to use for device."""
|
||||
return ICON
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes of the device."""
|
||||
|
|
|
@ -24,7 +24,6 @@ REQUIREMENTS = ['python-miio==0.3.9', 'construct==2.9.41']
|
|||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = 'Xiaomi Vacuum cleaner'
|
||||
ICON = 'mdi:roomba'
|
||||
DATA_KEY = 'vacuum.xiaomi_miio'
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
|
@ -142,7 +141,6 @@ class MiroboVacuum(VacuumDevice):
|
|||
def __init__(self, name, vacuum):
|
||||
"""Initialize the Xiaomi vacuum cleaner robot handler."""
|
||||
self._name = name
|
||||
self._icon = ICON
|
||||
self._vacuum = vacuum
|
||||
|
||||
self.vacuum_state = None
|
||||
|
@ -158,11 +156,6 @@ class MiroboVacuum(VacuumDevice):
|
|||
"""Return the name of the device."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return the icon to use for device."""
|
||||
return self._icon
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
"""Return the status of the vacuum cleaner."""
|
||||
|
|
|
@ -118,7 +118,6 @@ class DysonTest(unittest.TestCase):
|
|||
component3 = Dyson360EyeDevice(device3)
|
||||
self.assertEqual(component.name, "Device_Vacuum")
|
||||
self.assertTrue(component.is_on)
|
||||
self.assertEqual(component.icon, "mdi:roomba")
|
||||
self.assertEqual(component.status, "Cleaning")
|
||||
self.assertEqual(component2.status, "Unknown")
|
||||
self.assertEqual(component.battery_level, 85)
|
||||
|
|
Loading…
Add table
Reference in a new issue