Add zone and reps for Xiaomi vacuum (#19777)

* xiaomi vacuum with zone and reps

* tail whitespace

* tail whitespaces

* new version

* fix params typs

* fix param type

* line length

* rytilahti tips

* houndci-bot

* fix trevis

* rytilahti tips

* service description

* syssi fix

* MartinHjelmare tips

* MartinHjelmare

* data_template schema

* line lenght

* line lenght

* line lenght

* data_template schema

* fix

* Update homeassistant/components/vacuum/xiaomi_miio.py

Co-Authored-By: marcogazzola <dev@marcogazzola.com>

* Update homeassistant/components/vacuum/xiaomi_miio.py

Co-Authored-By: marcogazzola <dev@marcogazzola.com>

* xiaomi vacuum with zone and reps

* tail whitespace

* new version

* fix param type

* rytilahti tips

* rytilahti tips

* MartinHjelmare

* data_template schema

* line lenght

* line lenght

* data_template schema

* fix

* Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev

* Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev"

This reverts commit e1f370b3b45d2541c8117146b0940d7c2b5bc8b0.

* log fixed

* Revert "log fixed"

This reverts commit 1f0e7b35e81154af476a0bf1ae00773180cadb98.

* Revert "Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev""

This reverts commit 1cf9e5ae1f5c1c0504fbf59763b39c6a5656cb91.

* Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev"

This reverts commit 0e8d53449a98fd33756397f31a891dd0d4d206ce.

* log fixed
This commit is contained in:
Marco Gazzola authored and Teemu R committed 2019-02-20 15:44:04 +01:00
1 parent 7e06d03b45
commit 5115dfada2
3 files changed
+66 -1

No files matched your search

+12 -1
View File
@@ -18,7 +18,8 @@ from homeassistant.components.xiaomi_miio.vacuum import (
ATTR_CLEANING_COUNT, ATTR_CLEANED_TOTAL_AREA, ATTR_CLEANING_TOTAL_TIME,
CONF_HOST, CONF_NAME, CONF_TOKEN,
SERVICE_MOVE_REMOTE_CONTROL, SERVICE_MOVE_REMOTE_CONTROL_STEP,
SERVICE_START_REMOTE_CONTROL, SERVICE_STOP_REMOTE_CONTROL)
SERVICE_START_REMOTE_CONTROL, SERVICE_STOP_REMOTE_CONTROL,
SERVICE_CLEAN_ZONE)
from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES, CONF_PLATFORM, STATE_OFF,
STATE_ON)
@@ -330,3 +331,13 @@ def test_xiaomi_specific_services(hass, caplog, mock_mirobo_is_on):
[mock.call.Vacuum().manual_control_once(control_once)], any_order=True)
mock_mirobo_is_on.assert_has_calls(status_calls, any_order=True)
mock_mirobo_is_on.reset_mock()
control = {"zone": [[123, 123, 123, 123]], "repeats": 2}
yield from hass.services.async_call(
DOMAIN, SERVICE_CLEAN_ZONE,
control, blocking=True)
mock_mirobo_is_off.assert_has_calls(
[mock.call.Vacuum().zoned_clean(
[[123, 123, 123, 123, 2]])], any_order=True)
mock_mirobo_is_off.assert_has_calls(status_calls, any_order=True)
mock_mirobo_is_off.reset_mock()