Generate 90+ bar chart from array (Battery Balance Monitoring)

Hello. I wasn’t able to find an answer anywhere on this.

I would like to create a bar chart with 90-100 bars representing cell voltages to monitor cell balance at a glance. I dont want to have to create 100 individual sensors for this so ideally I would publish all 100 values as an array, csv string or json and just have the bar chart line them up in order as they appear.

Example of what I am after is here:

Data is being collected/processed by ESPHome so I have flexibility which how it is published.

Any help/pointers appreciated.

Then you will have to create your own integration and dashboard card as nothing like this exists.

I was facing a similar scenario. I have a device that reports all of the individual cell voltages of each battery pack as an array. 16 cells/battery adds up quick. It looked similar to

pack_details1 = {
  "percent":100,
  "voltages":[3.34,3.34,3.34,3.34,3.34,3.34,3.34,3.34,3.34,3.34,3.34,3.34,3.35,3.34,3.34,3.35]
}

I ended up writing a script that created each individual entity based on the serial number and cell number of each battery from the array and saved it as a giant text file, which then I loaded in config.

It sure would be nice to be able to read arrays natively.

In theory you could do this with “data_generator” on an apexcharts-card. If you make the graph span in days match the number of batteries, and have the values in an array property on an entity. I suspect the main problem would be controlling the bar width.

1 Like

Most of cards need an entity as a data source.
You should either create 100 sensors or one sensor with 100 attributes.

That could work but I find large datasets in ApexCharts tend to slow the frontend down considerably.

Thanks for the advice and good to see I’m not missing something obvious.

What do you mean by 1 entity with 100 attributes? How would that work on the front-end?