mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 01:08:03 +01:00
Fix homeassistant.service schema lambda (#833)
* Fix homeassistant.service schema lambda Fixes https://github.com/esphome/issues/issues/820 * Improve * Fix
This commit is contained in:
parent
e2d5257632
commit
1e1837000d
1 changed files with 2 additions and 2 deletions
|
@ -70,14 +70,14 @@ def to_code(config):
|
||||||
cg.add_global(api_ns.using)
|
cg.add_global(api_ns.using)
|
||||||
|
|
||||||
|
|
||||||
KEY_VALUE_SCHEMA = cv.Schema({cv.string: cv.templatable(cv.string)})
|
KEY_VALUE_SCHEMA = cv.Schema({cv.string: cv.templatable(cv.string_strict)})
|
||||||
|
|
||||||
HOMEASSISTANT_SERVICE_ACTION_SCHEMA = cv.Schema({
|
HOMEASSISTANT_SERVICE_ACTION_SCHEMA = cv.Schema({
|
||||||
cv.GenerateID(): cv.use_id(APIServer),
|
cv.GenerateID(): cv.use_id(APIServer),
|
||||||
cv.Required(CONF_SERVICE): cv.templatable(cv.string),
|
cv.Required(CONF_SERVICE): cv.templatable(cv.string),
|
||||||
cv.Optional(CONF_DATA, default={}): KEY_VALUE_SCHEMA,
|
cv.Optional(CONF_DATA, default={}): KEY_VALUE_SCHEMA,
|
||||||
cv.Optional(CONF_DATA_TEMPLATE, default={}): KEY_VALUE_SCHEMA,
|
cv.Optional(CONF_DATA_TEMPLATE, default={}): KEY_VALUE_SCHEMA,
|
||||||
cv.Optional(CONF_VARIABLES, default={}): KEY_VALUE_SCHEMA,
|
cv.Optional(CONF_VARIABLES, default={}): cv.Schema({cv.string: cv.returning_lambda}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue