Add target to services.yaml (#46410)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Bram Kragten 2021-02-16 09:35:27 +01:00 committed by GitHub
parent 20d93b4b29
commit 6986fa4eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 7 deletions

View file

@ -448,12 +448,16 @@ async def async_get_all_descriptions(
# Don't warn for missing services, because it triggers false
# positives for things like scripts, that register as a service
description = descriptions_cache[cache_key] = {
description = {
"description": yaml_description.get("description", ""),
"target": yaml_description.get("target"),
"fields": yaml_description.get("fields", {}),
}
if "target" in yaml_description:
description["target"] = yaml_description["target"]
descriptions_cache[cache_key] = description
descriptions[domain][service] = description
return descriptions