Reduce automation state changes by using script helper's last_triggered attribute (#39323)

This commit is contained in:
Phil Bruckner 2020-08-28 14:51:15 -05:00 committed by GitHub
parent 92c06f0818
commit b315df2118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 21 deletions

View file

@ -73,7 +73,7 @@ async def test_service_specify_data(hass, calls):
time = dt_util.utcnow()
with patch("homeassistant.components.automation.utcnow", return_value=time):
with patch("homeassistant.helpers.script.utcnow", return_value=time):
hass.bus.async_fire("test_event")
await hass.async_block_till_done()
@ -587,11 +587,7 @@ async def test_automation_stops(hass, calls, service):
],
}
}
assert await async_setup_component(
hass,
automation.DOMAIN,
config,
)
assert await async_setup_component(hass, automation.DOMAIN, config)
running = asyncio.Event()