da80da71d1ac29c55c7a08c8025489e85f22e79f
Field Mapping options (new category at top of editor): - Charge field: pick which numeric field drives the battery level (falls back to first number field if unset) - Enable load metric: toggle + field picker for a load/power draw percentage, displayed as a themed semi-circular gauge arc beside the battery (green < 50%, amber 50-80%, red > 80%) - Enable state field: toggle + field picker + user-defined values for charging/discharging so the panel uses an explicit data field rather than computing state from the rate of change Visual integration: - Load gauge renders in a card with the battery, scales responsively, and collapses to a compact text line in small panels - State field drives the status badge, gradient direction, and charging animation (overrides computed rate when enabled) - All new options use showIf for conditional visibility in the editor Also fixed deprecation warnings by replacing .toArray() with Array.from() for Grafana 12+ compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Grafana Battery Visualisation
I hate writing documentation, and since I will have ADHD brain, I will forget how to do this.
npm install
npm run build
cp -r dist /var/lib/grafana/plugins/andydixon-battery-panel
in /etc/grafana/grsfana.ini add andydixon-battery-panel to allow_loading_unsigned_plugins
Languages
TypeScript
87%
JavaScript
9.5%
Dockerfile
2.8%
Shell
0.7%