Why is my automation to call homeassistant.update_entity failing with "extra keys not allowed @ data['device_id']"?

Due to possible throttling issues on the API the Growatt integration uses, there’s an option to disable automatic polling and then allow you to poll less frequently. So I created what I thought would be the following very simple automation to get the two devices the integration provides to update at 15 min intervals:

alias: Update Device Automation
description: ""
trigger:
  - platform: time_pattern
    minutes: /15
condition: []
action:
  - service: homeassistant.update_entity
    target:
      device_id:
        - 27255d1a5e92a4cb5f1adb04ca80ffe6
        - f70f0d3dff46f49f1366aebe253b05aa
    data: {}
mode: single

This was created through the UI. But it doesn’t cause an update and the trace log shows:

Triggered by the time pattern at 5 May 2023 at 18:15:00
Home Assistant Core Integration: Update entity NWCTCH107G, Home solar Total
Stopped because an error was encountered at 5 May 2023 at 18:15:00 (runtime: 0.01 seconds)
extra keys not allowed @ data['device_id']

I’ve tried various options using the area and the devices, but only if I break them out to the individual entities themselves will it run. Why does the UI and some of the docs imply the device/area alone will work?
Home Assistant 2023.5.1
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.2 - latest

Thanks for any pointers, I’ve searched and searched and found nothing that suggests I’m doing anything wrong…

If you look at the documentation for this service you will see that only an entity_id may be specified:

https://www.home-assistant.io/integrations/homeassistant/#service-homeassistantupdate_entity

The UI is non specific. There are different services that do allow areas or device ids to be specified. Always check the documentation.

Thanks, the page that led me there (Service Calls - Home Assistant) and the UI gave me the impression it was the general case that all services could be called with either areas or devices not just entities. I did read the docs :slight_smile: