diff --git a/src/components/ha-service-picker.ts b/src/components/ha-service-picker.ts index c370928521e1..6e7a5e27ad72 100644 --- a/src/components/ha-service-picker.ts +++ b/src/components/ha-service-picker.ts @@ -114,10 +114,13 @@ class HaServicePicker extends LitElement { if (!filter) { return processedServices; } + const split_filter = filter.split(' ') return processedServices.filter( - (service) => - service.service.toLowerCase().includes(filter) || - service.name?.toLowerCase().includes(filter) + (service) => { + const lower_service_name = service.name.toLowerCase(); + const lower_service = service.service.toLowerCase(); + return split_filter.every(f => lower_service_name.includes(f)) || split_filter.every(f => lower_service.toLowerCase().includes(f)) + } ); } );