2024.8 services as actions in YAML. How to adapt?

Hi

For those of us using YAML configurations, regarding the change in 2024.8 where we are supposed to change service to action, is there somewhere where this change is explained?

I’ve seen a few examples, but I would prefer a detailed specification of what to change and how.

  1. How to search for instances that need changing in my configuration files? Is service: a good text search to use?

  2. What to do with those sections, exactly?

Thanks in advance for any help.

You just expalined it. That is all there is to it.

You don’t need to do anything. The change is backward compatible with service:

1 Like

That sounds too good to be true… :sweat_smile:

So what is going on in this example here?

Please see also the reply to that post (from @parautenbach ). Is that correct?

Thanks for your help, I appreciate it.

No it isn’t correct. The reply you mentioned is.

Note also that if you use VSCode to edit your YAML the Home Assistant Helper extension schema has not yet been updated and will falsely mark the new action syntax as incorrect.

2 Likes

I did the change already by search & repalce in my editor. :slight_smile:

I searched for all “- service:” and replaced them by “- action:”. That’s it. No errors, but I have to admit, I didn’t check, if I got all the occurences, or if the S&R missed some.

1 Like

It’s wrong and parautenbach corrected it.

The user didn’t simply change service to action (which is fine) they also changed data to target.

entity_id can be under target (or data) but option can only be under data not target.

2 Likes