Make service field filter parameters exclusive (#90728)

This commit is contained in:
Erik Montnemery 2023-04-03 21:46:23 +02:00 committed by GitHub
parent d4d77d9395
commit 59511cc3f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,10 +34,10 @@ FIELD_SCHEMA = vol.Schema(
vol.Optional("advanced"): bool,
vol.Optional(CONF_SELECTOR): selector.validate_selector,
vol.Optional("filter"): {
vol.Optional("attribute"): {
vol.Exclusive("attribute", "field_filter"): {
vol.Required(str): [vol.All(str, service.validate_attribute_option)],
},
vol.Optional("supported_features"): [
vol.Exclusive("supported_features", "field_filter"): [
vol.All(str, service.validate_supported_feature)
],
},