Add support for device class in target selector (#43768)
This commit is contained in:
parent
2f73590714
commit
a5c79a1f84
2 changed files with 2 additions and 1 deletions
|
@ -120,4 +120,4 @@ class TargetSelector(Selector):
|
|||
Value should follow cv.ENTITY_SERVICE_FIELDS format.
|
||||
"""
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema({"entity": {"domain": str}})
|
||||
CONFIG_SCHEMA = vol.Schema({"entity": {"domain": str, "device_class": str}})
|
||||
|
|
|
@ -125,6 +125,7 @@ def test_time_selector_schema(schema):
|
|||
{},
|
||||
{"entity": {}},
|
||||
{"entity": {"domain": "light"}},
|
||||
{"entity": {"domain": "binary_sensor", "device_class": "motion"}},
|
||||
),
|
||||
)
|
||||
def test_target_selector_schema(schema):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue