diff --git a/homeassistant/components/frontend/services.yaml b/homeassistant/components/frontend/services.yaml index 2a562ab348a..0cc88baf32f 100644 --- a/homeassistant/components/frontend/services.yaml +++ b/homeassistant/components/frontend/services.yaml @@ -11,6 +11,7 @@ set_theme: example: "default" selector: theme: + include_default: true mode: name: Mode description: The mode the theme is for. diff --git a/homeassistant/helpers/selector.py b/homeassistant/helpers/selector.py index 61ac81b0bca..c7087918cf0 100644 --- a/homeassistant/helpers/selector.py +++ b/homeassistant/helpers/selector.py @@ -1201,7 +1201,11 @@ class ThemeSelector(Selector[ThemeSelectorConfig]): selector_type = "theme" - CONFIG_SCHEMA = vol.Schema({}) + CONFIG_SCHEMA = vol.Schema( + { + vol.Optional("include_default", default=False): cv.boolean, + } + ) def __init__(self, config: ThemeSelectorConfig | None = None) -> None: """Instantiate a selector.""" diff --git a/tests/helpers/test_selector.py b/tests/helpers/test_selector.py index 10dc825372f..c1d5f76ea78 100644 --- a/tests/helpers/test_selector.py +++ b/tests/helpers/test_selector.py @@ -747,6 +747,11 @@ def test_icon_selector_schema(schema, valid_selections, invalid_selections) -> N ("abc",), (None,), ), + ( + {"include_default": True}, + ("abc",), + (None,), + ), ), ) def test_theme_selector_schema(schema, valid_selections, invalid_selections) -> None: