* Vacuum: Added support for STATES
* Added debug logging and corrected state order
* typo
* Fix travis error, STATE = STATE for readability
* status -> state
* Changed to Entity instead of ToogleEntity
* Updated some vacuums
* Revert changes
* Revert Changes
* added SUPPORT_STATE
* Woof?
* Implement on/off if STATE not supported
* Moved new state vaccum to Class StateVacuumDevice
* Error: I should go to bed
* Moved around methods for easier reading
* Added StateVacuumDevice demo vacuum
* Added tests for StateVacuumDevice demo vacuum
* Fix styling errors
* Refactored to BaseVaccum
* Vacuum will now go back to dock
* Class BaseVacuum is for internal use only
* return -> await
* return -> await
* Fix MQTT retained message not being re-dispatched
* Fix tests
* Use paho-mqtt for retained messages
* Improve code style
* Store list of subscribers
* Fix lint error
* Adhere to Home Assistant's logging standard
"Try to avoid brackets and additional quotes around the output to make it easier for users to parse the log."
- https://home-assistant.io/developers/development_guidelines/
* Add reconnect tests
* Fix lint error
* Introduce Subscription
Tests still need to be updated
* Use namedtuple for MQTT messages
... And fix issues
Accessing the config manually at runtime isn't ideal
* Fix MQTT __init__.py tests
* Updated usage of Mocks
* Moved tests that were testing subscriptions out of the MQTTComponent test, because of how mock.patch was used
* Adjusted the remaining tests for the MQTT clients new behavior - e.g. self.progress was removed
* Updated the async_fire_mqtt_message helper
* ✅ Update MQTT tests
* Re-introduce the MQTT subscriptions through the dispatcher for tests - quite ugly though... 🚧
* Update fixtures to use our new MQTT mock 🎨
* 📝 Update base code according to comments
* 🔨 Adjust MQTT test base
* 🔨 Update other MQTT tests
* 🍎 Fix carriage return in source files
Apparently test_mqtt_json.py and test_mqtt_template.py were written on Windows. In order to not mess up the diff, I'll just redo the carriage return.
* 🎨 Remove unused import
* 📝 Remove fire_mqtt_client_message
* 🐛 Fix using python 3.6 method
What's very interesting is that 3.4 didn't fail on travis...
* 🐛 Fix using assert directly
* vacuum.xiaomi_miio: read dnd status properly instead of using imprecise dnd flag from vacuum_state
* vacuum.xiaomi_miio: use miio package instead of mirobo
* check only that wanted calls have taken place, ignore order of calls
* Fix linting issues
* Remove empty line after docstring
* Added new statistic attributes
Added new attributes:
- Cleaning count
- Total cleaning time
- Total cleaning area
- Time left to change main brush, side brush and filter
* Code corrections
Code corrections
* Remove wronge hanging indentation
* Added new attributes
ATTR_MAIN_BRUSH_LEFT
ATTR_SIDE_BRUSH_LEFT
ATTR_FILTER_LEFT
ATTR_CLEANING_COUNT
ATTR_CLEANED_TOTAL_AREA
ATTR_CLEANING_TOTAL_TIME
* Remove trailing white space
* Corrections of the unit test for new attributes
* Hound corrections
* Init self.clean_history, self.consumable_state
* Hound correction
* - Cleaning time and total cleaning time shown in minutes
- Cleaned area and total cleaned area shown in square meters
- Main brush left, side brush left, filter left time shown in hours
- Display of the unit of measurement
* Remove trailing white spaces
* Fixed wrong continued indentation
* Fixed Hound
* Fixed Hound
* Added new statistic attributes
Added new attributes:
- Cleaning count
- Total cleaning time
- Total cleaning area
- Time left to change main brush, side brush and filter
* Code corrections
Code corrections
* Remove wronge hanging indentation
* Init self.clean_history, self.consumable_state
* Hound correction
* Remove UOM
* Merge
* Init self.clean_history, self.consumable_state
* Hound correction
* Init self.clean_history, self.consumable_state
* Hound correction
* Removed double declarations
* Basic MQTT vacuum support
* PR feedback
* Support for fan_speed and send_command services
* Fix configurable topics
* Use configurable bools for cleaning/docked/stopped state
* Fix language in docstring
* PR feedback
* Remove duplicate vacuum/state topic defaults
* Fix incorrect template for docked value
* Move direction like default mqtt platfom/components
* fix None on templates
* fix tests
* fix int
* fix tests
* ready to merge
* rename xiaomi to xiaomi_aqara
* rename xiaomi vacuum and xiaomi phillips light to xiaomi miio
* update discovery and tests
* style
* update discovery and tests
* Still use Philips as name
* Add new service `clean_spot` to vacuums
- Add as base component service, with associated support flag to make it optional
- Implement on Demo vacuum
- Implement on Xiaomi vacuum
- Update tests for platforms Demo and Xiaomi
- Change default icon for vacuums to `mdi:roomba`, but keep the one for the Xiaomi
- (In a polymer PR: add new service to command toolbar in the 'more-info' card)
* Add `clean_spot` service description
* fix default properties for vacuum component
* Fix tests for Demo vacuum platform (and increase coverage)
* increase coverage of xiaomi vacuum tests and include in coverage
Also little fixes
* remove print statement
* 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