Add recent context (#15989)

* Add recent context

* Add async_set_context to components not using new services
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-08-20 17:39:53 +02:00
1 parent d1e1b9b38a
commit 1be61df9c0
11 files changed
+211 -11

No files matched your search

+3 -1
View File
@@ -345,6 +345,8 @@ async def async_setup(hass, config):
update_tasks = []
for light in target_lights:
light.async_set_context(service.context)
pars = params
if not pars:
pars = params.copy()
@@ -356,7 +358,7 @@ async def async_setup(hass, config):
continue
update_tasks.append(
light.async_update_ha_state(True, service.context))
light.async_update_ha_state(True))
if update_tasks:
await asyncio.wait(update_tasks, loop=hass.loop)