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
123
(Taras)
March 7, 2023, 12:16pm
2
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:
opened 11:57AM - 13 Jun 22 UTC
yaml
<!--
!! Read 1 & 2 first !!
1. Is it an YAML parsing error?
This … extension depends on another package to parse and validate
the raw YAML. If it's a generic YAML Parser error, please report it here:
https://github.com/JPinkney/yaml-ast-parser
In doubt? Read more:
https://github.com/keesschollaart81/vscode-home-assistant/wiki/Is-it-the-YAML-parser%3F
2. Is a HA scheme error?
Feel free to fix this yourself, it's quite easy, HowTo here:
https://github.com/keesschollaart81/vscode-home-assistant/wiki/HowTo:-Update-the-schema's
-->
Following recent changes to the MQTT device tracker, valid YAML is flagged with errors...
![image](https://user-images.githubusercontent.com/57624938/173348164-be8bc39e-4c69-4f73-afba-3984df0986c1.png)
Version of VSCode Helper is 1.30.1
```YAML
mqtt:
device_tracker:
- name: "bi_adam"
state_topic: "blue_iris/sensor/bi_geofence_adam/state"
payload_home: "home"
payload_not_home: "away"
- yaml
```
and/or point to a repository containing your Home Assistant Configuration
Thank you, it’s been driving me nuts