Automatically Convert From Legacy Template to Modern Template Format

I have a lot of custom sensors in the (now) legacy Template format (Template - Home Assistant).

Is there a tool anywhere that converts the old legacy Template format to the modern format (i.e. Template - Home Assistant)? It’s going to be very time consuming updating my config manually…

Nope.

And what makes it more difficult is that the new format generates the entity id from the name. There is no such link in the old format. e.g.

Converting this to the new template format (and keeping the entity_id’s the same):

- platform: template
  sensors:
    lounge_dehumidifier_dry_mode:
      friendly_name: 'Dry Mode'
      value_template: >

Would require name: Lounge Dehumidifier Dry Mode and a friendly_name of Dry Mode set in customize.

1 Like

Cool…cool, cool, cool…(sigh)

I started looking at doing the same and just gave up.

I’m glad they kept that the “legacy” format would work, but my fear (and expectation) is that they will eventually deprecate and remove it. I like some of the changes of the new template format, but not being able to template a friendly name is annoying. I have quite a few template sensors set up to monitor my EVSE, and I change the friendly name based on what it is currently doing (standby, charging, etc). That’s not possible with the new format since you have to go to the customize to be able to set a friendly name.

I hope they at least add the ability to template the friendly name. The new format is cleaner, I just don’t like that some of the capabilities of the old format went away.

Yeah I buckled and spent 8+ hours transferring them all over to the new format.

Yes it is. I have some weather sensors that use this for the date.

I created a feature request, please vote.

1 Like

Added my vote to it.

2 Likes

The friendly name change you added was great. I still hate the fact that you can’t specify the entity_id as before and it is formed from the name. Would love to know the logic behind that. I’ve found in certain circumstances, after making some kind of change, the name I renamed it to, will REVERT to the ID formed by the name again. Frustrating.

Unless I’m missing something…

I too bit the bullet and converted to modern format…about 8+ hours later and I’m done (@1:21 am)…
I reviewed my Lovelace and edited each entity_id since I added a unique_id to each, or changed Lovelace where needed…tedious process!!