diff --git a/homeassistant/helpers/selector.py b/homeassistant/helpers/selector.py index 9eae351ae43a..eabedcbf5794 100644 --- a/homeassistant/helpers/selector.py +++ b/homeassistant/helpers/selector.py @@ -1698,7 +1698,11 @@ class ObjectSelector(Selector[ObjectSelectorConfig]): if field_data.get("required") and field not in _config: raise vol.Invalid(f"Field {field} is required") if field in _config: - selector(field_data["selector"])(_config[field]) # type: ignore[operator] + field_selector = field_data["selector"] + if isinstance(field_selector, Selector): + field_selector(_config[field]) # type: ignore[operator] + else: + selector(field_selector)(_config[field]) # type: ignore[operator] for key in _config: if key not in self.config["fields"]: diff --git a/tests/helpers/test_selector.py b/tests/helpers/test_selector.py index cf9a2d77d210..b07af1588027 100644 --- a/tests/helpers/test_selector.py +++ b/tests/helpers/test_selector.py @@ -1366,6 +1366,12 @@ def test_object_selector_uses_selectors(snapshot: SnapshotAssertion) -> None: config = {selector_type: schema} selector.validate_selector(config) selector_instance = selector.selector(config) + selector_instance( + [ + {"name": "Test 1", "percentage": 50}, + {"name": "Test 2", "percentage": 70}, + ] + ) # Serialize selector selector_instance = selector.selector({selector_type: schema})