* Restore the ability to tell when a harmony activity is starting
* adjust for poweroff
* switch to activity name for activity starting
* adjust
* do not set starting on initial update
Automations or HomeKit may turn the device on multiple times
when the current activity is already active which will cause
harmony to lose state. This behavior is unexpected as turning
the device on when its already on isn't expected to reset state.
We would connect to the hub via discovery and via setup
around the same time. This put additional load on the hub
which can increase the risk of timeouts.
* Make devices and activities visibile as harmony attributes
* Allow restoring previous activity, add tests
* fix test
* Kill activity_notify with fire
* remove trailing ,
* Allow activity change on start of switch
Allow activity to be updated when a switch to a new activity is initiated instead of when it is completed.
* Updates based on feedback
Some items are not required to be done as YAML is not used anymore.
Cleaned-up some code.
* Fix for change on how to set callbacks
How callbacks are set now one has to set the new_activity and new_activity_starting as well, even just with None.
* Added callback update
Added so that when it is changed in the UI the callbacks will be changed as well.
* Added test cases for notify setting
Added test cases for config flow to test new setting for activity notifications.
* replaced MagicMock with CoroutineMock to avoid exception
* added conversion to str so mock returns unique-id that doesn't throw json exception
* added non-empty config since hass throws exception when config is empty
* Add prettier (in pre-commit and CI)
* Make all file prettier
* Change order
* Add to Azure Pipelines
* Fix a YAML file prettier caught as invalid
* Remove flow mapping using curly braces from all YAML service files
* Add yamllint (in pre-commit and CI)
* Fix linting for all YAML files
* Bump and add it to requirements
* Fix gen_requirements for pre-commit, remove 'v' from version
* Handle race condition in harmony setup
If the remote was discovered via ssdp before the yaml config import
happened, the unique id would already be set and the import
would abort.
* Update homeassistant/components/harmony/config_flow.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* reduce
* black
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>