Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CoMPaTech/32706c8cc9a7b31701a6267ac146b1c8 to your computer and use it in GitHub Desktop.
Save CoMPaTech/32706c8cc9a7b31701a6267ac146b1c8 to your computer and use it in GitHub Desktop.
Additional panel for battery health (lephisto/tesla-apiscraper) : Note the ###FIXTHIS### entries
{
"aliasColors": {
"Ideal range vs Battery level": "#e24d42",
"charge_state.mean_mean": "#e24d42"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "###FIXTHIS###",
"fill": 1,
"gridPos": {
"h": 4,
"w": 20,
"x": 4,
"y": 25
},
"id": 36,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "Ideal range vs Battery level",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"hide": false,
"measurement": "charge_state",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"ideal_battery_range"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"*1.609344/mean(\"battery_level\")*100"
],
"type": "math"
}
]
],
"tags": [
{
"key": "display_name",
"operator": "=",
"value": "###FIXTHIS###"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Projected max range",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "lengthkm",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment