mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Add support for automation description (#26662)
* Add support for automation annotation * Rename annotation to description
This commit is contained in:
parent
c17057de4b
commit
10572a62b1
@ -43,6 +43,7 @@ ENTITY_ID_FORMAT = DOMAIN + ".{}"
|
||||
GROUP_NAME_ALL_AUTOMATIONS = "all automations"
|
||||
|
||||
CONF_ALIAS = "alias"
|
||||
CONF_DESCRIPTION = "description"
|
||||
CONF_HIDE_ENTITY = "hide_entity"
|
||||
|
||||
CONF_CONDITION = "condition"
|
||||
@ -95,6 +96,7 @@ PLATFORM_SCHEMA = vol.Schema(
|
||||
# str on purpose
|
||||
CONF_ID: str,
|
||||
CONF_ALIAS: cv.string,
|
||||
vol.Optional(CONF_DESCRIPTION): cv.string,
|
||||
vol.Optional(CONF_INITIAL_STATE): cv.boolean,
|
||||
vol.Optional(CONF_HIDE_ENTITY, default=DEFAULT_HIDE_ENTITY): cv.boolean,
|
||||
vol.Required(CONF_TRIGGER): _TRIGGER_SCHEMA,
|
||||
|
@ -53,7 +53,7 @@ class EditAutomationConfigView(EditIdBasedConfigView):
|
||||
|
||||
# Iterate through some keys that we want to have ordered in the output
|
||||
updated_value = OrderedDict()
|
||||
for key in ("id", "alias", "trigger", "condition", "action"):
|
||||
for key in ("id", "alias", "description", "trigger", "condition", "action"):
|
||||
if key in cur_value:
|
||||
updated_value[key] = cur_value[key]
|
||||
if key in new_value:
|
||||
|
Loading…
x
Reference in New Issue
Block a user