I’m working on a lovelace card for my vehicle, and I need to create an entity for total range. I’m not heavy into coding, but I can cut and paste.
It already reports current range based on fuel and average fuel consumption (currently 130 miles), but I need a total for a bar graph (320 miles). Any ideas?
Creating a sensor through a template is easy, but the issue with a static sensor is that HA only updates values, if they have changed.
That means you might risk having a sensor that are at the right value, but in the time frame you pull for your card there will be no registrations for that sensor, so it will not be shown or shown as zero.
I do not have a solution to this, but I hope this text will make the next one thinking about replying having him think about this issue before just suggesting a simple template sensor.
Sorry, if I’m not fully getting this, but wouldn’t it be the easiest to create a Number Helper, set it to 320(?), and never touch it again?
Why would it need to be a sensor?
1 Like
Same issue with a number helper.