Template Sensor Error - property unit of measurement is not allowed

I’ve got the following in templates.yaml, but it showing an shown - any idea what am I doing wrong?

    - name: "Energy daily charge rate"
      unit_of_measurement: "GBP"
      state: "{{ states('sensor.smart_meter_electricity_import_standing_charge')|float/1000 }}"
      unique_id: d43a0e4b-c5e2-4e51-82e0-fd0f14ecdeca
    - name: "Asjusted Gas daily charge rate"
      unit_of_measurement: "GBP"
      state: "{{ states('sensor.smart_meter_gas_import_standing_charge')|float/1000 }}"
      unique_id: 1cbaa42e-58c7-48b2-b69e-0cffc783acf3

You appear to be using VS Code with the Home Assistant Config Helper.

That message is produced by Config Helper.

As long as the YAML you posted is under the sensors key, there’s nothing wrong with unit_of_measurement and Config Helper has identified a non-existent problem. Report it as an Issue in Config Helper’s GitHub repository. Here’s a similar issue:

Thank you, it’s been driving me nuts :slight_smile: