core/tests/components
Eugenio Panadero 96f8c37dcd Xiaomi vacuum as platform of new `vacuum` component derived from ToggleEntity, and services (#8623)
* Xiaomi vacuum as component with switch, sensors and services

- Conversion from switch platform to async component.
- Add services proposed in #8416 to the new component, with shorter names.
- Add sensors for the vacuum robot as a selectable list from `battery`, `state`, `error`, `fanspeed`, `clean_time` and `clean_area` (the state attributes of the switch). The sensors don't poll, but listen to a signal to update the state, the switch fires this signal when updating.
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)

* path change in requirements_all (from switch platform to component)

* copy pasting is a bad habit

* services to the components services.yaml, modify .coveragerc

* review: use with multiple hosts, fix calls to async_add_devices, fix ranges for services

* `icon_for_battery_level` util method

* Xiaomi vacuum as platform of new component vacuum

- Created new component `vacuum` from a ToggleEntity.
- Add services `turn_on`, `turn_off`, `cleaning_play_pause`, `stop`, `return_to_base`, `locate`, `set_fanspeed` and `send_command`.
- Remove the main switch for the xiaomi vacuum (the toggable main entity is the switch).
- Add `support flags` for the common services
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
- Move services descriptions to a yaml file for the new component.
- Update requirements_all.
- Update coveragerc.

* fix coveragerc

* fix battery icon helper to use more icons

* remove sensors, create properties and support flags for custom UI

* cleaning

* updated state_attrs for filtering in UI, renamed platform to simply `xiaomi`

* fix platform rename

* change fanspeed and expose `fanspeed_list` to use speed steps

* minor fixes

- Rename service `start_pause`
- Add 'Error' attribute only if `got_error`.
- Minor changes

* rename state attrs

* rename state attrs

* review changes: cut fan__speed, style changes, remove logging, and more

* add ATTR_COMMAND = 'command' to const

* pop entity_id from service data

* remove property accessor for vacuum object

* lint fix

* fix extra attrs names

* module level functions for calling the services

* params as optional keyword for `send_command`

* params as optional keyword for `send_command`, remove debug logs

* explicit parameters for `set_fan_speed` and `send_command`

* Demo platform for the vacuum component

* vacuum tests for the Demo platform

* some fixes

* don't omit vacuum

* vacuum tests for the Xiaomi platform

* fix test

* fix

* fix xiaomi test

* fix coveragerc

* test send command

* fix coveragerc

* fix string formatting

* The coverage is to low. It need 93% or more
2017-08-04 15:27:10 +02:00
..
alarm_control_panel Manual alarm with MQTT control (#8257) 2017-07-24 09:06:38 -07:00
automation Remove deprecated automation keywords (#8510) 2017-07-17 22:24:05 +02:00
binary_sensor Remove some more usage of run_in_executor (#8352) 2017-07-06 14:08:32 +02:00
calendar assertEquals is deprecated (#7777) 2017-05-25 22:21:22 -07:00
camera Remove some more usage of run_in_executor (#8352) 2017-07-06 14:08:32 +02:00
climate Honeywell fixes and improvements (#8756) 2017-08-01 16:18:14 +02:00
config Get rid of mock http component app (#7775) 2017-05-25 21:13:53 -07:00
cover Fix Z-Wave barrier discovery for new API (#8706) 2017-07-30 00:40:56 -04:00
device_tracker Fix the "302" error in the UPC Connect component and remove the need to specify the router password (#8335) 2017-07-04 21:06:24 -07:00
emulated_hue Get rid of mock http component app (#7775) 2017-05-25 21:13:53 -07:00
fan Add new Dyson sensors (#8199) 2017-07-07 16:59:41 -07:00
http Fix tests (#7659) 2017-05-19 07:37:39 -07:00
image_processing Support adding different server locations for Microsoft face component (#7532) 2017-05-12 10:53:25 +02:00
light Add mochad light component (#8476) 2017-08-03 10:51:01 +02:00
lock Fix attribute entity (#8066) 2017-06-17 10:03:49 -07:00
media_player Add Soundtouch support for playing an HTTP url (#8370) 2017-07-06 22:28:09 -07:00
mqtt Fixed mqtt subscription filter on sys $ topics (#8166) 2017-06-26 22:17:55 -07:00
notify Add support for the expirationTime parameter. (#7895) 2017-06-04 22:46:18 -07:00
recorder Exclude filter for event types (#7627) 2017-05-24 15:23:52 -07:00
remote Clean up remote component (#8728) 2017-07-31 20:52:39 -07:00
scene Add voluptuous config validation to scenes (#6830) 2017-03-28 23:39:53 -07:00
sensor Add 'forecast' ability to yr weather sensor (#8650) 2017-08-01 22:42:51 -07:00
switch MQTT Switch: add availability_topic for online/offline status (#8593) 2017-07-27 08:24:15 +02:00
tts Remove more test requirements (#7574) 2017-05-13 21:25:54 -07:00
vacuum Xiaomi vacuum as platform of new `vacuum` component derived from ToggleEntity, and services (#8623) 2017-08-04 15:27:10 +02:00
weather Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
zwave Use standard entity_ids for zwave entities (#7786) 2017-06-16 13:07:17 -04:00
__init__.py Fix PEP257 issues 2016-03-09 10:25:50 +01:00
test_alert.py Adding done_message to alert (#8116) 2017-06-30 21:07:12 -07:00
test_alexa.py Feature alexa launch request (#8730) 2017-08-01 22:53:36 -07:00
test_api.py API POST has new state validation (fix for state = 0) (#8324) 2017-07-03 23:35:57 +02:00
test_apiai.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_configurator.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
test_conversation.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_datadog.py Remove more test requirements (#7574) 2017-05-13 21:25:54 -07:00
test_demo.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_device_sun_light_trigger.py Fix tests (#7659) 2017-05-19 07:37:39 -07:00
test_discovery.py Update netdisco (#7563) 2017-05-12 20:14:17 -07:00
test_dyson.py Add Dyson Pure Cool Link support (#7795) 2017-06-14 13:56:03 +02:00
test_ffmpeg.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_frontend.py Make themes API work even when themes are not defined. (#8473) 2017-07-14 11:26:26 -07:00
test_google.py assertEquals is deprecated (#7777) 2017-05-25 22:21:22 -07:00
test_graphite.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_group.py Properly handle the case when a group includes itself. (#8398) 2017-07-08 09:20:11 -07:00
test_hassio.py Hass.io: logo support / timeout handling (#8668) 2017-07-27 12:23:22 -07:00
test_history.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_influxdb.py InfluxDB component improvements (#8633) 2017-08-03 16:26:01 +02:00
test_init.py Split mock_service (#8198) 2017-06-25 10:53:15 -07:00
test_input_boolean.py Initial state over restore state (#6924) 2017-04-04 09:29:49 -07:00
test_input_select.py Initial state over restore state (#6924) 2017-04-04 09:29:49 -07:00
test_input_slider.py Bugfix slider (#7047) 2017-04-11 09:23:41 -07:00
test_intent_script.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_introduction.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_kira.py Add Kira component to sensor and remote platforms (#7479) 2017-05-12 21:12:47 -07:00
test_litejet.py Fix up docstring for tests (#5090) 2016-12-28 20:04:59 +02:00
test_logbook.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_logentries.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_logger.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_microsoft_face.py Support adding different server locations for Microsoft face component (#7532) 2017-05-12 10:53:25 +02:00
test_mqtt_eventstream.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_panel_custom.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_panel_iframe.py Fix iFrame panel test 2017-07-13 10:19:59 -07:00
test_persistent_notification.py dismiss service for persistent notifications (#7996) 2017-06-11 22:54:10 +02:00
test_pilight.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_plant.py Fix plants calling async methods from sync context (#8200) 2017-06-25 10:07:28 -07:00
test_prometheus.py Add support for Prometheus (#8211) 2017-07-10 21:20:17 -07:00
test_proximity.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_python_script.py Enhance python_script to support "_getitem_" (#8541) 2017-07-19 22:56:24 -07:00
test_rest_command.py exposed content_type in rest_command (#7101) 2017-04-18 11:50:43 +02:00
test_rflink.py Correct spelling of aliases, deprecate old config options. (#8348) 2017-07-06 15:59:54 +02:00
test_rfxtrx.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_ring.py Clean artifacts after running Ring tests. (#6944) 2017-04-05 11:26:56 +02:00
test_rss_feed_template.py Feature/rss feed template (#7032) 2017-04-24 22:16:47 -07:00
test_script.py Group service / dynamic handling (#7971) 2017-06-16 00:52:28 +02:00
test_shell_command.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_shopping_list.py Persist shopping list + clear completed (#8697) 2017-07-29 12:22:38 -07:00
test_sleepiq.py aiohttp 2 (#6835) 2017-03-30 00:50:53 -07:00
test_snips.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_spc.py Add support for Vanderbilt SPC alarm panels and attached sensors (#7663) 2017-06-04 23:53:25 -07:00
test_splunk.py Added host variable to Splunk.py and updated tox tests (#8052) 2017-06-15 20:41:19 -07:00
test_statsd.py Adding support for mapping keys to value in statsd (#8665) 2017-07-27 08:58:34 +02:00
test_sun.py Refactor sun component for correctness (#7295) 2017-05-09 00:03:34 -07:00
test_updater.py Updater improvements to send option component information (#7720) 2017-06-15 22:29:18 -07:00
test_wake_on_lan.py New service `send_magic_packet` with new component `wake_on_lan` (#8397) 2017-07-10 18:37:51 -07:00
test_weblink.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_websocket_api.py Add security layer to send file output things (#8189) 2017-06-26 00:10:30 +02:00
test_zone.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00