ITADN

Device action picker not showing actions for NUT integration actions

#53733Openaenea 创建于 23 小时前
A
aeneacommented
### Checklist - [x] I have updated to the latest available Home Assistant version. - [x] I have cleared the cache of my browser. - [x] I have tried a different browser to see if it is related to my browser. - [x] I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources. ### Describe the issue you are experiencing ### The problem The Device action picker (Settings → Automations & Scenes → new automation/script → Add action → Device) shows no actions for a device, even though the backend has them. Confirmed via the websocket API directly from the browser console: ```js document.querySelector('home-assistant').hass.connection .sendMessagePromise({type: 'device_automation/action/list', device_id: '<device_id>'}) .then(console.log) ``` returns a populated array (8 actions) for the exact device the picker shows as empty for. ### First noticed on A NUT (Network UPS Tools) integration device added for the first time today — not a migrated/legacy device, so this isn't stale device-registry linkage from an old config entry. ### What I expected The Device action picker to list the same actions the `device_automation/action/list` websocket call returns. ### What actually happened Action picker shows no actions available for the device. `device_automation/action/list` called directly returns: ```json [ {"type": "beeper_mute", "device_id": "<id>", "domain": "nut", "metadata": {}}, {"type": "beeper_disable", "device_id": "<id>", "domain": "nut", "metadata": {}}, {"type": "test_panel_start", "device_id": "<id>", "domain": "nut", "metadata": {}}, {"type": "beeper_enable", "device_id": "<id>", "domain": "nut", "metadata": {}}, {"type": "shutdown_reboot", "device_id": "<id>", "domain": "nut", "metadata": {}}, {"type": "load_off", "device_id": "<id>", "domain": "nut", "metadata": {}}, {"type": "shutdown_stop", "device_id": "<id>", "domain": "nut", "metadata": {}}, {"type": "test_panel_stop", "device_id": "<id>", "domain": "nut", "metadata": {}} ] ``` Workaround: skip the picker, write the device action directly in YAML (`device_id` / `domain: nut` / `type: <command>`) inside a script — this executes correctly, confirming the integration and `async_call_action_from_config` both work. Only the picker UI fails to surface the actions. ### Suspected cause All 8 of these actions have no `entity_id` in their metadata (NUT's parameterless commands are entity-less device actions by design — see the [NUT integration docs](https://www.home-assistant.io/integrations/nut/#nut-device-commands)). Most other integrations' device actions are entity-backed, so a picker regression that only drops entity-less actions would explain why this hasn't been widely reported. Possibly the same underlying issue as home-assistant/core#168072, which was filed against `core` and assumed a backend/auth problem — but in my case the backend demonstrably returns the correct action list, so the defect looks like it belongs in `frontend`, not `core`. ### Describe the behavior you expected ### What I expected The Device action picker to list the same actions the `device_automation/action/list` websocket call returns. ### Steps to reproduce the issue ### Steps to reproduce 1. Add a NUT integration entry with valid `instcmds` credentials for a device that supports parameterless commands (no switchable outlets). 2. Settings → Automations & Scenes → new script → Add action → Device → search for the device. 3. Observe: no actions listed / "No actions available." 4. From browser console, call `device_automation/action/list` for that device's id. 5. Observe: populated action array returned. ### What version of Home Assistant Core has the issue? core-2026.8.2 ### What was the last working version of Home Assistant Core? _No response_ ### In which browser are you experiencing the issue? _No response_ ### Which operating system are you using to run this browser? Windows 11 ### State of relevant entities ```txt ``` ### Problem-relevant frontend configuration ```yaml ``` ### JavaScript errors shown in your browser console/inspector ```txt ``` ### Additional information This issue was very much diagnosed/written by AI
1 条评论