mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Add support for spot cleaning that was introduced in pybotvac 0.12 (#19857)
* Added support for spot cleaning that was introduced in pybotvac 0.12. * Corrected formating. * Added missing operator.
This commit is contained in:
commit
82c6d3d8c2
@ -13,7 +13,7 @@ from homeassistant.components.vacuum import (
|
||||
SUPPORT_STATE, SUPPORT_STOP, SUPPORT_START, STATE_IDLE,
|
||||
STATE_PAUSED, STATE_CLEANING, STATE_DOCKED, STATE_RETURNING, STATE_ERROR,
|
||||
SUPPORT_MAP, ATTR_STATUS, ATTR_BATTERY_LEVEL, ATTR_BATTERY_ICON,
|
||||
SUPPORT_LOCATE)
|
||||
SUPPORT_LOCATE, SUPPORT_CLEAN_SPOT)
|
||||
from homeassistant.components.neato import (
|
||||
NEATO_ROBOTS, NEATO_LOGIN, NEATO_MAP_DATA, ACTION, ERRORS, MODE, ALERTS)
|
||||
|
||||
@ -24,7 +24,7 @@ DEPENDENCIES = ['neato']
|
||||
SCAN_INTERVAL = timedelta(minutes=5)
|
||||
|
||||
SUPPORT_NEATO = SUPPORT_BATTERY | SUPPORT_PAUSE | SUPPORT_RETURN_HOME | \
|
||||
SUPPORT_STOP | SUPPORT_START | \
|
||||
SUPPORT_STOP | SUPPORT_START | SUPPORT_CLEAN_SPOT | \
|
||||
SUPPORT_STATE | SUPPORT_MAP | SUPPORT_LOCATE
|
||||
|
||||
ATTR_CLEAN_START = 'clean_start'
|
||||
@ -225,3 +225,7 @@ class NeatoConnectedVacuum(StateVacuumDevice):
|
||||
def locate(self, **kwargs):
|
||||
"""Locate the robot by making it emit a sound."""
|
||||
self.robot.locate()
|
||||
|
||||
def clean_spot(self, **kwargs):
|
||||
"""Run a spot cleaning starting from the base."""
|
||||
self.robot.start_spot_cleaning()
|
||||
|
Loading…
x
Reference in New Issue
Block a user