mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user