* 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>
* Remove unnecessary exception re-wraps
* Preserve exception chains on re-raise
We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.
The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.
Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.
* Fix mistaken re-wrap in homematicip_cloud/hap.py
Missed the difference between HmipConnectionError and
HmipcConnectionError.
* Do not hide original error on plex new cert validation error
Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
* 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.