Avoid references to websocket_api.const in core and other components (#119285)

This commit is contained in:
epenet
2024-06-10 13:49:44 +02:00
committed by GitHub
parent 2e3c3789d3
commit 960d1289ef
25 changed files with 49 additions and 63 deletions

View File

@@ -642,7 +642,7 @@ async def google_assistant_get(
if not state:
connection.send_error(
msg["id"],
websocket_api.const.ERR_NOT_FOUND,
websocket_api.ERR_NOT_FOUND,
f"{entity_id} unknown",
)
return
@@ -651,7 +651,7 @@ async def google_assistant_get(
if entity_id in CLOUD_NEVER_EXPOSED_ENTITIES or not entity.is_supported():
connection.send_error(
msg["id"],
websocket_api.const.ERR_NOT_SUPPORTED,
websocket_api.ERR_NOT_SUPPORTED,
f"{entity_id} not supported by Google assistant",
)
return
@@ -755,7 +755,7 @@ async def alexa_get(
):
connection.send_error(
msg["id"],
websocket_api.const.ERR_NOT_SUPPORTED,
websocket_api.ERR_NOT_SUPPORTED,
f"{entity_id} not supported by Alexa",
)
return