Adjust automation to plural triggers/conditions/actions keys (#123823)
* Adjust automation to plural triggers/conditions/actions keys * Fix some tests * Adjust websocket tests * Fix search tests * Convert blueprint and blueprint inputs to modern schema * Pass schema when creating Blueprint object * Update tests * Adjust websocket api --------- Co-authored-by: Joostlek <joostlek@outlook.com> Co-authored-by: Erik <erik@montnemery.com>
This commit is contained in:
parent
08bdf797f0
commit
9dfabc3fb7
25 changed files with 488 additions and 183 deletions
|
@ -1307,7 +1307,7 @@ async def test_automation_with_bad_action(
|
|||
},
|
||||
)
|
||||
|
||||
assert expected_error.format(path="['action'][0]") in caplog.text
|
||||
assert expected_error.format(path="['actions'][0]") in caplog.text
|
||||
|
||||
|
||||
@patch("homeassistant.helpers.device_registry.DeviceEntry", MockDeviceEntry)
|
||||
|
@ -1341,7 +1341,7 @@ async def test_automation_with_bad_condition_action(
|
|||
},
|
||||
)
|
||||
|
||||
assert expected_error.format(path="['action'][0]") in caplog.text
|
||||
assert expected_error.format(path="['actions'][0]") in caplog.text
|
||||
|
||||
|
||||
@patch("homeassistant.helpers.device_registry.DeviceEntry", MockDeviceEntry)
|
||||
|
@ -1375,7 +1375,7 @@ async def test_automation_with_bad_condition(
|
|||
},
|
||||
)
|
||||
|
||||
assert expected_error.format(path="['condition'][0]") in caplog.text
|
||||
assert expected_error.format(path="['conditions'][0]") in caplog.text
|
||||
|
||||
|
||||
async def test_automation_with_sub_condition(
|
||||
|
@ -1541,7 +1541,7 @@ async def test_automation_with_bad_sub_condition(
|
|||
},
|
||||
)
|
||||
|
||||
path = "['condition'][0]['conditions'][0]"
|
||||
path = "['conditions'][0]['conditions'][0]"
|
||||
assert expected_error.format(path=path) in caplog.text
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue