The “new way” only applies to Template integration-based sensors, binary sensors, buttons, images, numbers and selects… It does not affect any sensor that is platform-based or template-based entities from other integrations such as template lights, template fans, template switches, etc.
Each helper type has its own json file in .storage, there is no corresponding entry in configuration.yaml. Be aware, manually editing anything in .storage is not advised.
Helpers have a json file for each helper type, but those files should NOT be manually edited. Helpers should be created and modified via the UI.
The “new” template format is for sensors, binary_sensors, buttons, images, numbers and selects only.
binary_sensors (and non-binary sensors ??) that use a platform or template from other integrations (Trend or Ping, for example) are not included in the “new” (or “old” ??) format.
Leaving out a closing double-quotation-mark results in red text.
And - simple template sensors, anything that only requires a template, and not a trigger, or a delay - can be done now in the UI they don’t have to be done in YAML.
I think there is a confusion on your side: You seem to consider all YAML configured entities as “templates”.
That’s not the case. Generally speaking, all integration going forward will be configured through the UI (e.g. Ping mentioned before). Where / How that UI configuration ends up physically store is irrelevant, and subjet to change (currently, JSON files in the .storage directory.
When integrations have not yet been migrated to UI, they are configured through editing the configuration.yaml file (there are ways to subdivide that file, but, conceptually, there is still one file).
Most integrations define platforms like sensor, binary_sensor, …
A template is a specific integration which is special in that it defines sensors, binary_sensors, … in a specific way, and that is what I outlined above.
To be complete, an outline of configuration would be
# Example configuration.yaml entry with two sections
template:
# Define state-based template entities
- sensor:
...
- binary_sensor:
...
# Define trigger-based template entities
- trigger:
...
sensor:
...
binary_sensor:
...
binary_sensor:
- platform: integrationA
conf1: foo
conf2: bar
- platform: integrationB
confX: bla
confY: bla
- platform: template
sensors:
my_template_sensor:
value_template: bla
sensor:
- platform: integrationA
conf1: foo
conf2: bar
- platform: integrationD
confX: bla
confY: bla
The “old” vs. “new” format regarding templates is how you define them:
No, partially because the UI does not offer all the functionality that YAML-defined template entities have.
For now, whether you convert legacy format template sensors and binary sensors to the new format and/or move anything to the UI is purely personal preference… AFAIK, there isn’t a functional reason to convert anything that is working the way you expect.
As other integrations have been moved to be 100% UI managed, the modus operandi has become to have them automatically migrated and raise a repair issue to tell the user that they need to remove them manually from the configuration. If the template integration ever gets moved, it is reasonable to expect that it will be handled the same way, if possible. If you wanted to prepare for that, it might be worthwhile to make sure all your YAML-configured entities are grouped together by integration or platform so they will be easy to find and remove. In other words… don’t have a “a total mess of a configuration.yaml”.