Fix missing service call context in multiple locations (#37094)
This commit is contained in:
1 parent
98a388e65a
commit
f42eb0d5ca
10 files changed
+66
-23
No files matched your search
@@ -84,14 +84,22 @@ class LightSwitch(LightEntity):
|
||||
"""Forward the turn_on command to the switch in this light switch."""
|
||||
data = {ATTR_ENTITY_ID: self._switch_entity_id}
|
||||
await self.hass.services.async_call(
|
||||
switch.DOMAIN, switch.SERVICE_TURN_ON, data, blocking=True
|
||||
switch.DOMAIN,
|
||||
switch.SERVICE_TURN_ON,
|
||||
data,
|
||||
blocking=True,
|
||||
context=self._context,
|
||||
)
|
||||
|
||||
async def async_turn_off(self, **kwargs):
|
||||
"""Forward the turn_off command to the switch in this light switch."""
|
||||
data = {ATTR_ENTITY_ID: self._switch_entity_id}
|
||||
await self.hass.services.async_call(
|
||||
switch.DOMAIN, switch.SERVICE_TURN_OFF, data, blocking=True
|
||||
switch.DOMAIN,
|
||||
switch.SERVICE_TURN_OFF,
|
||||
data,
|
||||
blocking=True,
|
||||
context=self._context,
|
||||
)
|
||||
|
||||
async def async_update(self):
|
||||
|
||||
Reference in new issue
Block a user