Don't leave empty arrays in the service control target (#18986)

This commit is contained in:
karwosts 2023-12-11 02:19:28 -08:00 committed by GitHub
parent a52ba5fbd1
commit 7167b66719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -597,9 +597,9 @@ export class HaServiceControl extends LitElement {
); );
} }
target = { target = {
entity_id: targetEntities, ...(targetEntities.length ? { entity_id: targetEntities } : {}),
device_id: targetDevices, ...(targetDevices.length ? { device_id: targetDevices } : {}),
area_id: targetAreas, ...(targetAreas.length ? { area_id: targetAreas } : {}),
}; };
} }
} }