diff --git a/homeassistant/helpers/selector.py b/homeassistant/helpers/selector.py index 1652e2110f4..3da4ccd1880 100644 --- a/homeassistant/helpers/selector.py +++ b/homeassistant/helpers/selector.py @@ -207,7 +207,11 @@ class DurationSelector(Selector): selector_type = "duration" - CONFIG_SCHEMA = vol.Schema({}) + CONFIG_SCHEMA = vol.Schema( + { + vol.Optional("enable_day"): cv.boolean, + } + ) def __call__(self, data: Any) -> dict[str, float]: """Validate the passed selection.""" diff --git a/tests/helpers/test_selector.py b/tests/helpers/test_selector.py index e9e70f15fad..5a2bc0c0baa 100644 --- a/tests/helpers/test_selector.py +++ b/tests/helpers/test_selector.py @@ -384,6 +384,11 @@ def test_attribute_selector_schema(schema, valid_selections, invalid_selections) ({"seconds": 10},), (None, {}), ), + ( + {"enable_day": True}, + ({"seconds": 10},), + (None, {}), + ), ), ) def test_duration_selector_schema(schema, valid_selections, invalid_selections):