home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.82k stars 30.91k forks source link

Undocumented changes to the homeassistant.update_entity Action have broken automations. #127491

Open birdwing opened 1 month ago

birdwing commented 1 month ago

The problem

I had a handful of automations, the biggest one being an automation to keep my WAZE times updated, that relied heavily on the homeassistant.update_entity Action.

These actions now all fail to run.

There was a recent pull request: https://github.com/home-assistant/core/pull/122497 That removed the "Target" selector and replaced it with an entities selector.

While this was accurate in that update_entity only supported entities. It changed the structure of the action. Even the Home Assistant Documentation example for this action still shows "target" being a part of the YAML structure. But now when you run the Action with that structure: image You get an error message saying that entity_id should be under data.

So this YAML change works: image Even though the documentation still shows the version using Target.

This was not the case before, and this was not listed as a breaking change in the Home Assistant release in which this change happened. It also continued working up until the most recent release. So something was changed in update_entity this release that breaks the old YAML setup that used "target".

Either the PR needs to be reverted, the update_entity action updated to look both under Target -> entity_id and Data -> entity_id, or a Breaking change note needs to be made to alert everyone to what has happened.

Right now all of my automations that used the update_entity action are broken.

I believe this change is also affecting some integrations as well, though I don't have enough information on that.

What version of Home Assistant Core has the issue?

core-2024.10.0

What was the last working version of Home Assistant Core?

core-2024.9.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

target:
  entity_id: sensor.aron_calendar_drive_time
data: {}
action: homeassistant.update_entity

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (homeassistant) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `homeassistant` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homeassistant` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


homeassistant documentation homeassistant source (message by IssueLinks)