Sensor template

Hi everyone,

I have just upgraded to the latest HA from version 0.106.6.
and the sensor component does not work anymore.

I get the following status:
This entity (‘sensor.file_value_text’) does not have a unique ID, therefore its settings cannot be managed from the UI.

In configuration.yaml I have used the following code:

  - platform: template
   sensors:
      file_value_number:
        value_template: "{{ states('sensor.File_value').split(';')[0] }}"
      file_value_text:
        value_template: "{{ states('sensor.File_value').split(';')[1].strip() }}"

Does anyone know how to this code must be changed in order to work in HA 2021.11.5

:open_mouth:

That is a huge jump and a lot of breaking changes to take into account. However…

I see two things wrong.

  1. This is not a valid entity id. There are no capital letters in entity ids:
sensor.File_value
  1. This indentation is incorrect:
  - platform: template
   sensors: