Ensure HA script and Python script services have a name (#47204)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Philip Allgaier 2021-03-31 15:09:45 +02:00 committed by GitHub
parent bee55a0494
commit 6fe04f40a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 4 deletions

View file

@ -12,6 +12,7 @@ from homeassistant.const import (
ATTR_NAME,
CONF_ALIAS,
CONF_DEFAULT,
CONF_DESCRIPTION,
CONF_ICON,
CONF_MODE,
CONF_NAME,
@ -54,7 +55,6 @@ ATTR_LAST_TRIGGERED = "last_triggered"
ATTR_VARIABLES = "variables"
CONF_ADVANCED = "advanced"
CONF_DESCRIPTION = "description"
CONF_EXAMPLE = "example"
CONF_FIELDS = "fields"
CONF_REQUIRED = "required"
@ -287,6 +287,7 @@ async def _async_process_config(hass, config, component):
# Register the service description
service_desc = {
CONF_NAME: script_entity.name,
CONF_DESCRIPTION: cfg[CONF_DESCRIPTION],
CONF_FIELDS: cfg[CONF_FIELDS],
}