diff --git a/src/components/ha-service-control.ts b/src/components/ha-service-control.ts index 3e009f0df0..33be6d4b78 100644 --- a/src/components/ha-service-control.ts +++ b/src/components/ha-service-control.ts @@ -597,9 +597,9 @@ export class HaServiceControl extends LitElement { ); } target = { - entity_id: targetEntities, - device_id: targetDevices, - area_id: targetAreas, + ...(targetEntities.length ? { entity_id: targetEntities } : {}), + ...(targetDevices.length ? { device_id: targetDevices } : {}), + ...(targetAreas.length ? { area_id: targetAreas } : {}), }; } }