mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Fix typing on Context.user_id (#68019)
This commit is contained in:
@@ -248,6 +248,7 @@ async def async_devices_disconnect(hass, data: RequestData, payload):
|
|||||||
|
|
||||||
https://developers.google.com/assistant/smarthome/develop/process-intents#DISCONNECT
|
https://developers.google.com/assistant/smarthome/develop/process-intents#DISCONNECT
|
||||||
"""
|
"""
|
||||||
|
assert data.context.user_id is not None
|
||||||
await data.config.async_disconnect_agent_user(data.context.user_id)
|
await data.config.async_disconnect_agent_user(data.context.user_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@@ -701,7 +701,7 @@ class HomeAssistant:
|
|||||||
class Context:
|
class Context:
|
||||||
"""The context that triggered something."""
|
"""The context that triggered something."""
|
||||||
|
|
||||||
user_id: str = attr.ib(default=None)
|
user_id: str | None = attr.ib(default=None)
|
||||||
parent_id: str | None = attr.ib(default=None)
|
parent_id: str | None = attr.ib(default=None)
|
||||||
id: str = attr.ib(factory=uuid_util.random_uuid_hex)
|
id: str = attr.ib(factory=uuid_util.random_uuid_hex)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user