I just learned that the template integration format has changed since I last made one. I used to use what is now the legacy format and I have them in a sensors.yaml file. I want to use the new format but I get an error no matter where I place the information and no matter what I include. What do I need to do to get it to work?
This is the data that I am trying to enter into my sensors.yaml file
template:
- sensor:
- name: Deebot N8 Pro+ Battery
unit_of_measurement: "%"
state: '{{ state_attr('vacuum.deebot_n8_pro', 'battery_level') }}'