* Adding switch code for harmony activities
* Working on-off
* Removing poll code for now
* Async updates for current activity
* Update our state based on events
* Notifications we got connected or disconnected
* Remove unncessary constructor arg
* Initial switch tests
* Additional tests for switch transitions
* Test transitions for availability
* Testing switch state changes
* Tests passing
* Final tests
* Updating manifest.
* Correctly mock the return value from a call to the library
* Adding new subscriber classes
* Update class name and location
* Got the refactor working locally.
* Tests passing
* Tracking state changes
* Remove write_to_config_file - this appears to never be read.
It was added far back in the past to account for a harmony library
change, but nothing ever reads that path.
Removing that side effect from tests is a pain - avoid the side effect
completely.
* Connection changes tested
* Clean up temporary code
* Update .coveragerc for harmony component
Specifically exclude untested files instead of the whole module
* Fix linting
* test sending activity change commands by id
* Improving coverage
* Testing channel change commands
* Splitting subscriber logic into it's own class
* Improve coverage and tighten up .coveragerc
* Test cleanups.
* re-add config file writing for harmony remote
* Create fixture for the mock harmonyclient
* Reduce duplication in subscription callbacks
* use async_run_job to call callbacks
* Adding some tests for async behaviors with subscribers.
* async_call_later for delay in marking remote unavailable
* Test disconnection handling in harmony remote
* Early exit if activity not specified
* Use connection state mixin
* Lint fix after rebase
* Fix isort
* super init for ConnectionStateMixin
* Adding @mkeesey to harmony CODEOWNERS
* 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.
* 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.
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>
* Use f-strings in integrations starting with "H"
* Use f-strings in integrations starting with "I"
* Use f-strings in integrations starting with "J"
* Use f-strings in integrations starting with "K"
* Use f-strings in integrations starting with "L"
* Fix lint error
* Use join instead of f-string in homekit_controller
* Use local variables with f-strings
* Fix lint error
* Escape the characters in f-string
* Sort imports with isort in homeworks light
* Fix pylint error
* Fix broken tests
* Fix broken tests v2
* Increase aioharmony version to 0.1.11
Update aioharmony version to 0.1.11, this new update contains fixes for websocket connection losses.
* Update requirements_all
* Update requirements
Updated requirements
* Small bump for aioharmony
Small version bump increase for aioharmony
* Add attributes
Add firmware and config version attributes
* Add hold for button press on send_command
* Fix requirements file
For some reason aioharmony ended up in there as a duplicate. Fixed it.
* Revert rebase changes
Revert some changes that should have been reverted back as part of rebase.
* Updated based on review
Removed HOLD_SECS from platform schema (configuration)
Updated getting kwargs in async_send_command
Updated debug log to include delay_secs