Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
This commit is contained in:
parent
24a16ff8fe
commit
3dc79aa60a
15 changed files with 379 additions and 154 deletions
|
@ -54,6 +54,10 @@ class Unauthorized(HomeAssistantError):
|
|||
"""Unauthorized error."""
|
||||
super().__init__(self.__class__.__name__)
|
||||
self.context = context
|
||||
|
||||
if user_id is None and context is not None:
|
||||
user_id = context.user_id
|
||||
|
||||
self.user_id = user_id
|
||||
self.entity_id = entity_id
|
||||
self.config_entry_id = config_entry_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue