I got this error, and I think I fixed it, by adding “unit of measurement”. how can I ask HA to check if the error has been fixed. will I only know by checking the error logs?
First occurred: May 11, 2023 at 12:24:46 PM (11 occurrences)
Last logged: May 11, 2023 at 12:24:46 PM
Entity sensor.door_room6_exit_batt_low (<class ‘homeassistant.components.template.sensor.SensorTemplate’>) is using native unit of measurement ‘None’ which is not a valid unit for the device class (‘battery’) it is using; expected one of [’%’]; Please update your configuration if your entity is manually configured,…
# Battery sensors to show batt_low on AD building map
- platform: template
sensors:
door_room6_exit_batt_low:
friendly_name: "Door Room 6 Exit Batt Low"
value_template: "{{ states('sensor.door_room6_exit_battery') | int <= 15 }}"
device_class: battery
unit_of_measurement: '%'
Could I remove device class and unit of measurement? I only used this template for my picture entity dashboard to show a low battery symbol. I just added unit_of_measurement because I was getting an error in the logs.
You got the error because you used device_class: battery for an entity that is not showing a number. Why not just use the sensor.door_room6_exit_battery on your dashboard?