I have a sensor that displays the badge in percentage of battery and I would like it to show in voltage
its a 12 volt battery so 0 to 12V at the moment is showing 0-100%. I would like to use a converter to show all in Volt ie 0%-0Volt and 100%-12Volt here is the current badge code which shows everything in %.
chart_type: line
period: hour
type: statistics-graph
entities:
Please post code between ```
Then, using the regular card, you cannot (almost sure) so you would have to create another template sensor to cover the conversion
Alternatively, you can use Apexcharts which allows some calculations
EDIT: since you are using statistics, the new template will take some time to get data and only ‘from’ the moment it is active.
Try this.
You would need to have more info about the battery though, like if it says 50%, what voltage is it. Once you have at least 2 points, you can use it. (more points more accurate more better)