-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Add template migration examples #42149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
cef2139
52a0e07
b88add8
e0a3213
5c94af4
3ce1186
9ae7d4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -2792,3 +2792,329 @@ The blueprint can now be used for creating template entities. | |||||||
| Event `event_template_reloaded` is fired when Template entities have been reloaded and entities thus might have changed. | ||||||||
|
|
||||||||
| This event has no additional data. | ||||||||
|
|
||||||||
| ## Legacy template deprecation migration guide | ||||||||
|
|
||||||||
| Legacy template entities are deprecated and will be removed in Home Assistant 2026.6.0. The deprecated template entities will produce a repair that guides you through the migration. | ||||||||
|
|
||||||||
| ### Migrating a legacy sensor into a new template section | ||||||||
|
|
||||||||
| This example covers how to migrate a legacy template sensor into modern syntax. | ||||||||
|
|
||||||||
| Take the example configuration.yaml file | ||||||||
|
||||||||
| Take the example configuration.yaml file | |
| Take the example `configuration.yaml` file |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Delete the following yaml from configuration.yaml file. | |
| Delete the following YAML from the `configuration.yaml` file. |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Make sure to keep all the other platforms in the sensor section. | |
| Make sure to keep all the other platforms in the sensor section. Your `configuration.yaml` file would look like this after the change: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| sensor: | |
| # configuration.yaml | |
| sensor: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The repair would provide the following yaml. | |
| The repair would provide the following YAML. |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This yaml should be added to the `template:` section inside configuration.yaml. | |
| This YAML should be added to the `template:` section inside `configuration.yaml`. |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not how we handle notes in our documentation.
{% note %}
some note
{% endnote %}
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let explain how to do that.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Take the example configuration.yaml file | |
| Take this example `configuration.yaml` file: |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Delete the following yaml from configuration.yaml file. | |
| Delete the following YAML from the `configuration.yaml` file. |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Make sure to keep all the other platforms in the sensor section. | |
| Make sure to keep all the other platforms in the sensor section. Your `configuration.yaml` file would look like this after the change: |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| sensor: | |
| # configuration.yaml | |
| sensor: |
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note handling needed.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's explain how to do that.
c0ffeeca7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Make sure to keep all the other platforms in the sensor file. | |
| Make sure to keep all the other platforms in the sensor file. Your `sensors.yaml` file would look like this after the change: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.