Track entity sources (#37258)

Co-authored-by: David Mulcahey <david.mulcahey@me.com>
This commit is contained in:
Paulus SchoutsenandDavid Mulcahey authored and GitHub committed 2020-08-19 14:57:38 +02:00
1 parent 24a16ff8fe
commit 3dc79aa60a
15 files changed
+379 -154

No files matched your search

+4
View File
@@ -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