mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
numeric state: validate multiple entities (#2066)
* validate multiple entities * point to current entity
This commit is contained in:
parent
8656bbbc79
commit
8df91e6a17
@ -16,7 +16,7 @@ from homeassistant.helpers import condition, config_validation as cv
|
|||||||
|
|
||||||
TRIGGER_SCHEMA = vol.All(vol.Schema({
|
TRIGGER_SCHEMA = vol.All(vol.Schema({
|
||||||
vol.Required(CONF_PLATFORM): 'numeric_state',
|
vol.Required(CONF_PLATFORM): 'numeric_state',
|
||||||
vol.Required(CONF_ENTITY_ID): cv.entity_id,
|
vol.Required(CONF_ENTITY_ID): cv.entity_ids,
|
||||||
CONF_BELOW: vol.Coerce(float),
|
CONF_BELOW: vol.Coerce(float),
|
||||||
CONF_ABOVE: vol.Coerce(float),
|
CONF_ABOVE: vol.Coerce(float),
|
||||||
vol.Optional(CONF_VALUE_TEMPLATE): cv.template,
|
vol.Optional(CONF_VALUE_TEMPLATE): cv.template,
|
||||||
@ -41,7 +41,7 @@ def trigger(hass, config, action):
|
|||||||
variables = {
|
variables = {
|
||||||
'trigger': {
|
'trigger': {
|
||||||
'platform': 'numeric_state',
|
'platform': 'numeric_state',
|
||||||
'entity_id': entity_id,
|
'entity_id': entity,
|
||||||
'below': below,
|
'below': below,
|
||||||
'above': above,
|
'above': above,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user