Fix benign typo in entity registry (#108270)
This commit is contained in:
parent
cfbfdf7949
commit
19258cb3df
1 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ EventEntityRegistryUpdatedData = (
|
||||||
EntityOptionsType = Mapping[str, Mapping[str, Any]]
|
EntityOptionsType = Mapping[str, Mapping[str, Any]]
|
||||||
ReadOnlyEntityOptionsType = ReadOnlyDict[str, ReadOnlyDict[str, Any]]
|
ReadOnlyEntityOptionsType = ReadOnlyDict[str, ReadOnlyDict[str, Any]]
|
||||||
|
|
||||||
DISLAY_DICT_OPTIONAL = (
|
DISPLAY_DICT_OPTIONAL = (
|
||||||
("ai", "area_id"),
|
("ai", "area_id"),
|
||||||
("di", "device_id"),
|
("di", "device_id"),
|
||||||
("tk", "translation_key"),
|
("tk", "translation_key"),
|
||||||
|
@ -208,7 +208,7 @@ class RegistryEntry:
|
||||||
Returns None if there's no data needed for display.
|
Returns None if there's no data needed for display.
|
||||||
"""
|
"""
|
||||||
display_dict: dict[str, Any] = {"ei": self.entity_id, "pl": self.platform}
|
display_dict: dict[str, Any] = {"ei": self.entity_id, "pl": self.platform}
|
||||||
for key, attr_name in DISLAY_DICT_OPTIONAL:
|
for key, attr_name in DISPLAY_DICT_OPTIONAL:
|
||||||
if (attr_val := getattr(self, attr_name)) is not None:
|
if (attr_val := getattr(self, attr_name)) is not None:
|
||||||
display_dict[key] = attr_val
|
display_dict[key] = attr_val
|
||||||
if (category := self.entity_category) is not None:
|
if (category := self.entity_category) is not None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue