Use the async_call context in result of call_service (#44458)

This commit is contained in:
Jason Cronquist 2020-12-31 19:15:39 -07:00 committed by GitHub
parent db6bd22fc9
commit 787027958d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"]: