Fix missing service call context in multiple locations (#37094)

This commit is contained in:
Franck Nijhof 2020-06-26 02:09:52 +02:00 committed by GitHub
parent 98a388e65a
commit f42eb0d5ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 66 additions and 23 deletions

View file

@ -233,7 +233,11 @@ class LightGroup(light.LightEntity):
if not emulate_color_temp_entity_ids:
await self.hass.services.async_call(
light.DOMAIN, light.SERVICE_TURN_ON, data, blocking=True
light.DOMAIN,
light.SERVICE_TURN_ON,
data,
blocking=True,
context=self._context,
)
return
@ -249,13 +253,18 @@ class LightGroup(light.LightEntity):
await asyncio.gather(
self.hass.services.async_call(
light.DOMAIN, light.SERVICE_TURN_ON, data, blocking=True
light.DOMAIN,
light.SERVICE_TURN_ON,
data,
blocking=True,
context=self._context,
),
self.hass.services.async_call(
light.DOMAIN,
light.SERVICE_TURN_ON,
emulate_color_temp_data,
blocking=True,
context=self._context,
),
)
@ -267,7 +276,11 @@ class LightGroup(light.LightEntity):
data[ATTR_TRANSITION] = kwargs[ATTR_TRANSITION]
await self.hass.services.async_call(
light.DOMAIN, light.SERVICE_TURN_OFF, data, blocking=True
light.DOMAIN,
light.SERVICE_TURN_OFF,
data,
blocking=True,
context=self._context,
)
async def async_update(self):