Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

karwosts
Copy link
Contributor

@karwosts karwosts commented Dec 9, 2023

Proposed change

I think we have a regression due to #18772, now when switching services we populate empty arrays in the target field.

target:
  entity_id:
    - alarm_control_panel.manual_alarm
  device_id: []
  area_id: []

Some backend service validators don't like this and will throw an error, e.g. services that don't accept areas will fail this target with a confusing error message. User must remove these manually from yaml to fix it.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@karwosts karwosts added this to the 2023.12 milestone Dec 9, 2023
@piitaya piitaya merged commit 7167b66 into home-assistant:dev Dec 11, 2023
14 checks passed
@karwosts karwosts deleted the no-service-empty-array branch December 11, 2023 22:28
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"homeassistant.update_entity": cannot call from Dev tools -> Services with default code
2 participants