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.
This commit is contained in:
1 parent
5642027ffb
commit
2fd6431cff
10 files changed
+53
-20
No files matched your search
@@ -66,6 +66,7 @@ async def test_form_import(hass):
|
||||
"name": "friend",
|
||||
"activity": "Watch TV",
|
||||
"delay_secs": 0.9,
|
||||
"activity_notify": True,
|
||||
"unique_id": "555234534543",
|
||||
},
|
||||
)
|
||||
@@ -78,6 +79,7 @@ async def test_form_import(hass):
|
||||
"name": "friend",
|
||||
"activity": "Watch TV",
|
||||
"delay_secs": 0.9,
|
||||
"activity_notify": True,
|
||||
}
|
||||
# It is not possible to import options at this time
|
||||
# so they end up in the config entry data and are
|
||||
@@ -148,6 +150,7 @@ async def test_form_cannot_connect(hass):
|
||||
"name": "friend",
|
||||
"activity": "Watch TV",
|
||||
"delay_secs": 0.2,
|
||||
"activity_notify": True,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user