RFC: Deprecate auto target all for services and introduce entity_id: * (#19006)
* Deprecate auto target all * Match on word 'all'
This commit is contained in:
parent
56c7e78cf2
commit
8ea0a8d40b
24 changed files with 143 additions and 41 deletions
|
@ -584,3 +584,16 @@ def test_is_regex():
|
|||
|
||||
valid_re = ".*"
|
||||
schema(valid_re)
|
||||
|
||||
|
||||
def test_comp_entity_ids():
|
||||
"""Test config validation for component entity IDs."""
|
||||
schema = vol.Schema(cv.comp_entity_ids)
|
||||
|
||||
for valid in ('ALL', 'all', 'AlL', 'light.kitchen', ['light.kitchen'],
|
||||
['light.kitchen', 'light.ceiling'], []):
|
||||
schema(valid)
|
||||
|
||||
for invalid in (['light.kitchen', 'not-entity-id'], '*', ''):
|
||||
with pytest.raises(vol.Invalid):
|
||||
schema(invalid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue