Deprecation of legacy template entities in 2025.12

Can somebody help me with this template:

template:
- cover:
  - unique_id: c0223bcb-32c6-430e-a2c1-3545f8031796
    open_cover:
    - target:
        entity_id:
        - cover.shades_curtain
      action: cover.close_cover
    close_cover:
    - target:
        entity_id:
        - cover.shades_curtain
      action: cover.open_cover
    stop_cover:
    - target:
        entity_id:
        - cover.shades_curtain
      action: cover.stop_cover
    set_cover_position:
    - data:
        position: '{{100-position}}'
        entity_id: cover.shades_curtain
      action: cover.set_cover_position
    default_entity_id: cover.shades_reversed
    icon: "{% if is_state('cover.shades_curtain', 'closed') %}\n  mdi:curtains\n{%
      else %}\n  mdi:curtains-closed\n{% endif %}"
    name: Shades Reversed
    position: '{{ 100 - state_attr(''cover.shades_curtain'', ''current_position'')
      | int(100) }}'

I copy that from repair suggestion in repairs, but than I got this message


Thank you

1 Like

I thought I was going to have the record at 209. Ugghhh.
Edit: It’s actually not that bad with the conversion provided. Much better than re-writing from scratch!

1 Like

is this working for the 2026.6 format? mine still asking for the code.

Not sure is this is the best answer, but I saw in this post a bit higher in this thread that you have to remove it from sensor.yaml and have to add it to configuration.yaml (or templates.yaml) I had the same error and after adding it to configuration.yaml and blanking out sensor.yaml it worked. I now added it to templates.yaml (and removed the starting ā€œtemplate:ā€ since it’s already in configuration.yaml) and now it’s working too.

For reference of the search terms (since your error message is a screenshot) I’ll add that the error message I had was that platform is a required key and is not provided

1 Like

14 for me but I have no clue how to change them, so happy with this change grrr

example what do I have to do, and this is just one of 14?

I only have four repairs, but since I don’t really know anything about templates, I can say:
These automatic repair suggestions are great. They helped me a lot, everything works after restarting HA and no more error messages. Thank you so much!

1 Like

I am wondering if using helpers would solve a lot. If I need to make all these changes, why not invest a bit extra time to just move them to a UI configuration. At least for those templates that can move?

2 Likes

I do not get repair suggestions at all, and many of the code snippets are long, often borrowed from examples so I am dead stuck and HA stopped working for a large part.

Where did you find the automatic repairs?

You couldn’t feel as stupid as I do. I asked Perplexity and they told me what I got already from the repair prompts - but told me to replace the platform template entries in my sensors.yaml file. Then when that failed they told me my indentation was wrong. Then after ā€œarguingā€ with IT (damn AI) it finally said the entries go in configuration.yaml - but of course they didn’t work there because I had platform template entries there for 2 covers. I asked where they went too - and offered that I had a templates.yaml file. Had I looked at that I would’ve seen the new format - and remembered why I even started that file a few months ago.
Anyway I guess I answered the question if I were dumber than AI

Jj, every repair provides you an exact copy paste. Literally copy\paste. It’s not an example, it’s migrated yaml.

If you don’t have a repair, there’s nothing to migrate

1 Like

They appeared automatically under ā€œSettingsā€ after the HA update. For each ā€œincorrectā€ template, an error message appeared with a repair suggestion.

All fixed.

Moved all templates to template.yaml

Used provided repair code for switch template instead of the old one:

Added line in config.yaml to include template.yaml

3 Likes

If people are patient and wait until 12.1 or 2, I’m going to make the repair more clear on what to move where.

11 Likes


Any idea what I am doing wrong here?

Are you including the template file?

I am. I migrated everything over to the template.yaml. All the sensors worked fine but I still get the errors on these switches

Did you remove the old switch? That’s the only way the repair shows up.

And then all stopped working, sorry to say one big mess! Whole HA is trash in one update, why was this needed this change???

The given changed new examples, just do not work, places sensors in template now they are gone, or get sensor_template_something as name so automations stopped working, front end sensors gone need to be replaced with sensor.template.
The examples as above with a switch placed in Template are bricked do not work anymore.

1 Like

Please read the first post.

They do. I have done them.

Sorry this is difficult to understand. Please share the config you had and the config you tried and we can help you.