mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use the async_call context in result of call_service (#44458)
This commit is contained in:
parent
db6bd22fc9
commit
787027958d
@ -132,15 +132,16 @@ async def handle_call_service(hass, connection, msg):
|
|||||||
blocking = False
|
blocking = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
context = connection.context(msg)
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
msg["domain"],
|
msg["domain"],
|
||||||
msg["service"],
|
msg["service"],
|
||||||
msg.get("service_data"),
|
msg.get("service_data"),
|
||||||
blocking,
|
blocking,
|
||||||
connection.context(msg),
|
context,
|
||||||
)
|
)
|
||||||
connection.send_message(
|
connection.send_message(
|
||||||
messages.result_message(msg["id"], {"context": connection.context(msg)})
|
messages.result_message(msg["id"], {"context": context})
|
||||||
)
|
)
|
||||||
except ServiceNotFound as err:
|
except ServiceNotFound as err:
|
||||||
if err.domain == msg["domain"] and err.service == msg["service"]:
|
if err.domain == msg["domain"] and err.service == msg["service"]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user