* Use common strings for harmony component
* Update homeassistant/components/harmony/strings.json
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* use default key for common config flow strings
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
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.
* 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>
If the harmony hub was not ready for connection or
was busy when importing from yaml, the import validation
would fail would not be retried.
To mitigate this scenario we now do the validation in
async_setup_platform which allows us to raise
PlatformNotReady so we can retry later.
If the IP address of the harmony hub changed it would
not be rediscovered. We now connect to get the
unique id and then update config entries with
the correct ip if it is already setup.
* Config flow for harmony
* Fixes unique ids when using XMPP
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
* Find the unique id for the config flow
* move shutdown to init
* Add test for ssdp (still failing)
* Fix ssdp test
* Add harmony to MIGRATED_SERVICE_HANDLERS (this is a breaking change)
* more cleanups
* use unique id for the config file
Co-authored-by: Bram Kragten <mail@bramkragten.nl>