Don't prevent automations from triggering themselves (#68178)

This commit is contained in:
Erik Montnemery 2022-03-15 18:48:54 +01:00 committed by GitHub
parent b99934f62f
commit 46f27fdefd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 212 additions and 6 deletions

View file

@ -840,8 +840,6 @@ async def test_recursive_script(hass, script_mode, warning_msg, caplog):
service_called.set()
hass.services.async_register("test", "script", async_service_handler)
hass.states.async_set("input_boolean.test", "on")
hass.states.async_set("input_boolean.test2", "off")
await hass.services.async_call("script", "script1")
await asyncio.wait_for(service_called.wait(), 1)
@ -908,8 +906,6 @@ async def test_recursive_script_indirect(hass, script_mode, warning_msg, caplog)
service_called.set()
hass.services.async_register("test", "script", async_service_handler)
hass.states.async_set("input_boolean.test", "on")
hass.states.async_set("input_boolean.test2", "off")
await hass.services.async_call("script", "script1")
await asyncio.wait_for(service_called.wait(), 1)