I’m struggling to get a sensor to be recognised as the battery device class.
It’s an http post sensor coming from Tasker on an android phone with the battery life. The data is coming through okay it just won’t seem to register as a battery class.
I have it set up as:
homeassistant:
customize:
sensor.android_battery:
device_class: "battery" (have also tried without quotes)
But it just comes through into my frontend as a normal sensor as if the code above isn’t there at all…
Running 0.69.0 on RPi3 Hassio, any help much appreciated!
It took effect after restarting home assistant. The icon changed to a battery, but the level does NOT have a unit of % (no unit at all). I had to do this to get the units to be %: