Legacy template entities (alarm_control_panel, binary_sensor, cover, fan, light, lock, sensor, switch, vacuum, weather) have been removed in 2026.6. You have to migrate to modern template entity syntax.
This change has been in the works for the past 6 months, and you should have received repairs for every legacy template when using versions 2025.12, 2026.1, 2026.2, 2026.3, 2026.4, and 2026.5. If you are still on those versions and you have the repairs, please head to this old thread.
Do I have to do anything?
If you have a repair that mentions “platform: template is not supported”, then you have legacy template entities that needs migration.
If you do not have any repairs, you are not affected by this deprecation.
Migration Guide for 2026.6+
This custom integration is required for migration in Home Assistant versions beyond 2026.6. Please understand that this will generate the bare minimum migration path and it requires minor edits to configuration.yaml. The custom integration traverses your configuration and migrates legacy templates to modern templates. Your logs will contain information on where legacy templates were found. You will have to remove the legacy templates, the integration does not remove them for you.
Installing the integration with HACS
Install the integration through HACS using this link or by adding https://github.com/Petro31/hass-migrate-template to HACS.
Restart Home Assistant
Add Legacy Template Migration Helper in integrations
Installing the integration without HACS
Copy the contents of custom_components/template_migration/ to <config>/custom_components/template_migration/
Restart Home Assistant
Add Legacy Template Migration Helper in integrations
A folder will be generated inside your configuration. This folder will be named migrated_templates and it will contain mutliple files. Each file will be a domain and it will contain all templates in that domain.
NOTE
The folder is only created if there are legacy templates in your configuration. Make sure to check the logs to ensure you have legacy templates or there are no errors.
Note: Add this exactly as written above, even if you have a top-level template: defined already in your configuration. It uses the label migrated, and so will be merged with any other existing templates you may have defined.
Verify the yaml loads properly by checking the configuration in Developer Tools -> YAML tab, Check configuration button.
Remove all references to the legacy templates. Your Home Assistant Logs will contain information where to look for the legacy template entities.
WARNING
Do not run the template_migration.generate_yaml action after removing legacy template entities.
This process should only be ran one time. Subsequent runs will overwrite the migrated templates each time. If you remove a legacy template entity and run the action again, the removed template entity will not show up in the migrated entities.
Be careful, make sure Check configuration passes before restarting Home Assistant. Restart Home Assistant.
Probably best for everyone that needs to follow this migration guide to make a backup before starting. I don't doubt Petro's efforts in anyway. It's just that I've been on these forums long enough to know instructions are often not followed exactly (especially in this case).
I want to echo the gratitude for Petro. The recent template changes were a massive improvement, and the migration tool you built made the process so much smoother for everyone. Thank you for your incredible work and for always supporting the HA community.
I am sorry if I am being really thick headed but I am confused. I just updated to 2026.6.0 and I have a repair for "Unsupported YAML configuration for the template integration". It tells me to remove anything that is:
sensor:
- platform: template
In my configuration.yaml file I have several "include:" lines. One for "binary_sensors.yaml", one for "sensors.yaml", and one for templates.yaml. There are no templates defined in binary_sensors.yaml or sensors.yaml. All templates are defined in templates.yaml. Within the templates.yaml file I have several under the keyword sensor: and one under the keyword binary_sensor:. All are producing a state in developer tools.
If these are in my configuration file as "template: !include templates.yaml" why am I getting the repair notice?
Running the migration utility and following your instructions fixed it. It was a template setup in the weather_alerts_1 as part of the old weather alerts integration. They refactored that when this template entity change was beginning. I didn't realize that the old one was still on the system. Do I need to keep the template migration: !include in my configuration.yaml now that I have deleted that weather_alerts_1 sensor?
I really don’t understand when this is a thing the user needs to do after installing the new HA version, why don’t developers build in such a migration functionality directly within Home Assistant?
If this want to be a solution for also non-tech people, migration should be standard handling things after an update of HA. Now we face too much breaking changes after an update which the user self needs to solve out everytime. This also counts for HACS developers of course.
On the other hand, still happy using HA. It’s the only platform which integrates and combine all my home automation stuff.
I did build a migration, it was available for 6 months in core. You ignored it for 6 months. Now that the removal is finalized, the migration was moved to a custom integration. Not much else I can do. It’s not my fault that y’all aren’t using the tools I provided.
You'll have to use an older version of the website through the way back machine. The migration guides were removed because the repair that existed is no longer present in the current version of HA. All of that code was migrated to the custom integration. I suggest you use that, or stay on the old version and use the way back machine.
I am afraid i didn't see any reference to any of this before, but maybe I read it, didn't realise the implications and then suddenly I was faced with it today. Neither did I realise there was a tool to convert the templates. So I read the Template instructions available and they did not seem to apply, and all I got were errors and lots of red warnings. After an hour I just gave up and deleted the entries as nothing seemed to work.
Back to NodeRed and sorted the same thing in a couple of minutes.
Whilst I really appreciate all the marvellous updates, and HA is looking really professional now, but improvements like this really beats me, I am not understanding why such a trivial pursuit should make something so difficult for the not very advanced programmer.
I am now on a purge to remove all the entries in the config that I can do another way, then i won't have to worry too much about crashing the system.
If you updated HA somewhere in the past 6 months, you have gotten a list of repairs (one for each template) with the new template plus a lot of instructions, plus a warning about things breaking starting this version.It was by far the best advanced warning I'ver ever seen in 40 years of IT. If you ignored that amount of information provided, then there is no one you can blame but yourself. You were warned, you got the help, you clicked ignore.
The red warnings were probably in Studio Code? Those are meaningless because the helper in there is too old. Those likely aren't actual errors.
I fail to see how node red can replace template sensors you say you removed. Isn't Node Red replacing automations? Those were unaffected. Are you sure that what you fixed with node red where template sensors?
If they were template sensors: Had you used the separate migration tool that is still available anywhere in that period, then the templates would have been automatically converted for you, all in one go. It cannot help you if they are gone. Maybe restore template sensors from a backup and run the external migration tool?
I get the distinct feeling removed support for legacy template sensors is not the problem you just fixed. Did you actually have broken sensors, or were you just freaked out by red wiggly lines?
Well you are completely correct, I did miss all the warnings and you are right it is entirely my fault as already admitted.
Right again I was freaked out by squiggly red lines and annotated messages that meant nothing to me.
My fault again, I am obviously totally ignorant on how to achieve some of the yaml in the config, so it's probably best I don't mess with it.
Incidentally you underestimate what can be achieved with NodeRed and HA.
Anyway I feel suitably chastised, and I will do better next time
It was not my intent to chastise. But I did feel the need to come to the defense of Petro, who I felt was blamed while he spent a humongous amount of effort to prevent what happened to you.
I also tried to find out what it was that caused your problem, because likely due to my limited knowledge of node red, it seemed a lot like your problem was something else entirely. If it was, you would not have gotten any repair, and that would have explained that you missed the otherwise very hard to miss repairs.
No need to come to the defense of Petro, I was in no way critisising what he does for HA, quite the reverse actually, I wish I had some of his understanding. I find it quite hard to learn new things at 75 years and it is incredibly frustrating trying to keep HA behaving. I probably have created a rod for my own back and made some very complex dashboards incorporating Tide flows, PVSolar, Ham Radio Station Monitoring, Aircraft ABS Plots, Sun/Moon/Weather Charts, Health, MQTT stuff, integrating Watch OS .... and much much more, but when there is an update I invariably have to spend some time fixing things. It's almost a fulltime job and without knowing the reasoning I couldn't see the point of moving the templates to it's own heading. Anyway I will keep things going as long as I can, as I enjoy tinkering and I will revisit the config.yaml and get to grips with it as I really don't like to be beaten.
So just to triple check - if I have addressed those repairs over last 6 months, and no more repairs prior to 2026.6, does that mean I'm good to go?
Or do I still need to do something, for example to download the HACS integration and re-check everything?
Would it be a good idea to maybe we can add a paragraph in the beginning of the 1st post, to clarify who the audiences this guide is for? Something like "If you have xxx and see yyy, follow this guide please. If not, it means you are good - no action required here... because your template are not legacy format any more."