Skip to content

Commit

Permalink
Don't leave empty arrays in the service control target (#18986)
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts authored Dec 11, 2023
1 parent a52ba5f commit 7167b66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ha-service-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } : {}),
};
}
}
Expand Down

0 comments on commit 7167b66

Please sign in to comment.