mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Add support for trigger descriptions with relative keys
This commit is contained in:
@@ -608,10 +608,15 @@ async def async_get_all_descriptions(
|
|||||||
new_descriptions_cache = descriptions_cache.copy()
|
new_descriptions_cache = descriptions_cache.copy()
|
||||||
for missing_trigger in missing_triggers:
|
for missing_trigger in missing_triggers:
|
||||||
domain = triggers[missing_trigger]
|
domain = triggers[missing_trigger]
|
||||||
|
trigger_description_key = (
|
||||||
|
platform_and_sub_type[1]
|
||||||
|
if len(platform_and_sub_type := missing_trigger.split(".")) > 1
|
||||||
|
else missing_trigger
|
||||||
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
yaml_description := new_triggers_descriptions.get(domain, {}).get( # type: ignore[union-attr]
|
yaml_description := new_triggers_descriptions.get(domain, {}).get( # type: ignore[union-attr]
|
||||||
missing_trigger
|
trigger_description_key
|
||||||
)
|
)
|
||||||
) is None:
|
) is None:
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
|
Reference in New Issue
Block a user