mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Allow 'all' entity_id in service schema (#20278)
This commit is contained in:
parent
1218127d83
commit
62844e237c
@ -517,7 +517,7 @@ SERVICE_SCHEMA = vol.All(vol.Schema({
|
|||||||
vol.Exclusive('service_template', 'service name'): template,
|
vol.Exclusive('service_template', 'service name'): template,
|
||||||
vol.Optional('data'): dict,
|
vol.Optional('data'): dict,
|
||||||
vol.Optional('data_template'): {match_all: template_complex},
|
vol.Optional('data_template'): {match_all: template_complex},
|
||||||
vol.Optional(CONF_ENTITY_ID): entity_ids,
|
vol.Optional(CONF_ENTITY_ID): comp_entity_ids,
|
||||||
}), has_at_least_one_key('service', 'service_template'))
|
}), has_at_least_one_key('service', 'service_template'))
|
||||||
|
|
||||||
NUMERIC_STATE_CONDITION_SCHEMA = vol.All(vol.Schema({
|
NUMERIC_STATE_CONDITION_SCHEMA = vol.All(vol.Schema({
|
||||||
|
@ -332,6 +332,10 @@ def test_service_schema():
|
|||||||
'service': 'homeassistant.turn_on',
|
'service': 'homeassistant.turn_on',
|
||||||
'entity_id': 'light.kitchen',
|
'entity_id': 'light.kitchen',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'service': 'light.turn_on',
|
||||||
|
'entity_id': 'all',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'service': 'homeassistant.turn_on',
|
'service': 'homeassistant.turn_on',
|
||||||
'entity_id': ['light.kitchen', 'light.ceiling'],
|
'entity_id': ['light.kitchen', 'light.ceiling'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user