I made some template sensors based on entity attributes. On the graph in Lovelace it shows “No State History Found” but if I click on the graph I do see the history bar. This is only for the templated sensors, other sensors graph fine. Is there some additional configuration step I am missing?
Add the following to your sensor: device_class: battery
This will add a unit of measurement, allowing you to graph the value. It will also add a battery icon that changes state depending on the battery level.
If you want to keep the icon you have now add unit_of_measurement: '%' instead of the device class.
Thanks but neither of these steps seemed to make a difference. Setting device_class: battery did change the icon to a battery with a question mark. But that was the only difference. I gave it a couple of days but no graph with that or setting uom to %.