Use the async_call context in result of call_service (#44458)
This commit is contained in:
parent
db6bd22fc9
commit
787027958d
1 changed files with 3 additions and 2 deletions
|
@ -132,15 +132,16 @@ async def handle_call_service(hass, connection, msg):
|
|||
blocking = False
|
||||
|
||||
try:
|
||||
context = connection.context(msg)
|
||||
await hass.services.async_call(
|
||||
msg["domain"],
|
||||
msg["service"],
|
||||
msg.get("service_data"),
|
||||
blocking,
|
||||
connection.context(msg),
|
||||
context,
|
||||
)
|
||||
connection.send_message(
|
||||
messages.result_message(msg["id"], {"context": connection.context(msg)})
|
||||
messages.result_message(msg["id"], {"context": context})
|
||||
)
|
||||
except ServiceNotFound as err:
|
||||
if err.domain == msg["domain"] and err.service == msg["service"]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue