diff --git a/homeassistant/helpers/selector.py b/homeassistant/helpers/selector.py index d81fa396c0b..b4a90212bce 100644 --- a/homeassistant/helpers/selector.py +++ b/homeassistant/helpers/selector.py @@ -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}}) diff --git a/tests/helpers/test_selector.py b/tests/helpers/test_selector.py index 2c2034147a1..531d36e4f50 100644 --- a/tests/helpers/test_selector.py +++ b/tests/helpers/test_selector.py @@ -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):