Add area support to input text service schemas (#25434)
This commit is contained in:
parent
2354108e6f
commit
20ed07cc5c
1 changed files with 3 additions and 3 deletions
|
@ -4,8 +4,9 @@ import logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID, ATTR_UNIT_OF_MEASUREMENT, CONF_ICON, CONF_NAME, CONF_MODE)
|
ATTR_UNIT_OF_MEASUREMENT, CONF_ICON, CONF_NAME, CONF_MODE)
|
||||||
from homeassistant.helpers.entity_component import EntityComponent
|
from homeassistant.helpers.entity_component import EntityComponent
|
||||||
from homeassistant.helpers.restore_state import RestoreEntity
|
from homeassistant.helpers.restore_state import RestoreEntity
|
||||||
|
|
||||||
|
@ -29,8 +30,7 @@ ATTR_MODE = 'mode'
|
||||||
|
|
||||||
SERVICE_SET_VALUE = 'set_value'
|
SERVICE_SET_VALUE = 'set_value'
|
||||||
|
|
||||||
SERVICE_SET_VALUE_SCHEMA = vol.Schema({
|
SERVICE_SET_VALUE_SCHEMA = ENTITY_SERVICE_SCHEMA.extend({
|
||||||
vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
|
|
||||||
vol.Required(ATTR_VALUE): cv.string,
|
vol.Required(ATTR_VALUE): cv.string,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue