Commit Graph

20 Commits (fad531415443d2283b0a3199a562207a56932111)

Author SHA1 Message Date
epenet 0047790db6
Use dataclass properties in harmony discovery (#60711)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 14:02:11 +01:00
J. Nick Koston cac0c04a91
Avoid setting up harmony websocket from discovery (#57589) 2021-10-17 20:32:02 -07:00
Michael b1138b1aab
Add constructor return type in integrations E-K (#50902) 2021-05-20 18:47:30 +03:00
J. Nick Koston 34c84a6bbb
Reduce boilerplate to abort for matching config entries (#50186)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-11 22:00:12 +02:00
Franck Nijhof 10d6dfd4ae
Clean up connection classes in integrations H-L (#49891) 2021-04-30 21:02:53 -10:00
J. Nick Koston e06bb3b5e7
Shutdown harmony connection on stop (#49335) 2021-04-18 09:44:29 +02:00
J. Nick Koston 5d7b53603f
Harmony: set confirm only (#47617) 2021-03-08 15:44:55 -08:00
Franck Nijhof bc1daf1802
None optional hass typing in FlowHandler (#46462)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-13 13:21:37 +01:00
J. Nick Koston 4efe6762c4
Remove YAML support from harmony (#45140) 2021-01-14 09:45:32 +01:00
springstan f919646519
Use already configured key in harmony and mikrotik (#41142) 2020-10-03 18:17:24 +02:00
groot406 01e47a977b
Use common strings for Harmony config flow (#41094)
* 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>
2020-10-03 13:31:45 +02:00
J. Nick Koston ed104d1927
Avoid error with ignored harmony config entries (#38367) 2020-07-29 21:20:06 +02:00
J. Nick Koston a07f4e0986
Ignore harmony hubs ips that are already configured during ssdp discovery (#38181)
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.
2020-07-25 11:13:47 +02:00
J. Nick Koston 76be95d7e0
Make devices and activities visible as harmony attributes (#37559)
* Make devices and activities visibile as harmony attributes

* Allow restoring previous activity, add tests

* fix test

* Kill activity_notify with fire

* remove trailing ,
2020-07-07 09:02:22 -05:00
ehendrix23 2fd6431cff
Allow harmony activity change on start of switching activity (#36699)
* 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.
2020-06-19 21:50:42 -05:00
J. Nick Koston 025cce3445
Handle race condition in harmony setup (#33611)
* 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>
2020-04-04 10:19:58 -05:00
J. Nick Koston 590e714021
Ensure harmony hub is ready before importing (#33537)
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.
2020-04-02 09:46:10 -07:00
J. Nick Koston 0b2a8bf79a
Make harmony handle IP address changes (#33173)
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.
2020-03-22 21:24:49 -07:00
J. Nick Koston c9592c1447
Harmony config flow improvements (#33018)
* Harmony config flow improvements

* Address followup review comments from #32919

* pylint -- catching my naming error

* remove leftovers from refactor
2020-03-19 20:43:44 -05:00
J. Nick Koston d33a3ca90f
Config flow for harmony (#32919)
* 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>
2020-03-19 11:29:51 -05:00