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

Update entity service call does not accept any target other than an entity #115008

Closed
Chaoscontrol opened this issue Apr 6, 2024 · 9 comments
Closed

Comments

@Chaoscontrol
Copy link

The problem

Title. Other service calls accept any kind of target, like areas, devices, or the new labels. But this specific service call returns an error
Failed to call service homeassistant.update_entity. extra keys not allowed @ data['label_id']. Got None
when trying to use other targets, even when they include several entities, and they exist.

I do this via UI, so label_id is correct etc.

Related Discord conv here.

What version of Home Assistant Core has the issue?

core-2024.4.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

service: homeassistant.update_entity
data: {}
target:
  label_id: manual_polling

Anything in the logs that might be useful for us?

websocket_api script: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['label_id']
websocket_api script: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['device_id']
websocket_api script: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['area_id']
[139717548086208] Error handling message: extra keys not allowed @ data['label_id']. Got None (invalid_format) Axel from 2a05:87c6:139b:0:44c3:6f37:dee5:482e (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36)
[139717548086208] Error handling message: extra keys not allowed @ data['device_id']. Got None (invalid_format) Axel from 2a05:87c6:139b:0:44c3:6f37:dee5:482e (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36)
[139717548086208] Error handling message: extra keys not allowed @ data['area_id']. Got None (invalid_format) Axel from 2a05:87c6:139b:0:44c3:6f37:dee5:482e (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36)

Additional information

No response

@joostlek
Copy link
Member

joostlek commented Apr 6, 2024

It was never possible in the first place, the target of the update_entity are individual entities.

@Chaoscontrol
Copy link
Author

Yeah, I didn't mean it's an issue of this update or anything. But since other calls accept those wrappers as targets, I imagine all calls should. After all they're just that, wrappers to be convenient. If they can't be used it defeats the purpose.

@joostlek
Copy link
Member

joostlek commented Apr 6, 2024

But that makes this a feature request and not an issue as nothing is broken. This is documented to only contain entity_ids and nothing more. This should belong on the forums and not on github as we use github for tracking issues.

@Chaoscontrol
Copy link
Author

My bad then. Will move it there.

@tomlut
Copy link

tomlut commented Apr 6, 2024

Actually it is an issue. Though maybe a frontend one. The Developer Tools -> Services GUI allows selecting more than just entities for this service:

Screenshot 2024-04-06 at 21-11-52 Developer Tools – Home Assistant

Which will fail.

@joostlek
Copy link
Member

joostlek commented Apr 6, 2024

Hmm, would that make this a frontend issue?

@tomlut
Copy link

tomlut commented Apr 6, 2024

I would have thought so.

@joostlek
Copy link
Member

joostlek commented Apr 6, 2024

I'll double check the payload, if anyone would be able to create an issue at the frontend repository, that'd be great

@Chaoscontrol
Copy link
Author

Appreciate it. While the frontend fix is better than nothing, my point was more towards making the service call accept the other targets instead, as I think that'd be useful. That's what the feature request was for.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants