Skip to content

Commit

Permalink
Update charging-stats for handling suc cost mixed with AC charge on T…
Browse files Browse the repository at this point in the history
…WC (#4137)

Some AC charging using a Tesla Wall Connector are selected as SUC charges and they make the total SUC cost wrong.
  • Loading branch information
cyberden authored Aug 23, 2024
1 parent 9b2de5f commit d3cca5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grafana/dashboards/charging-stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nJOIN\n charges char ON char.charging_process_id = cp.id AND char.date = end_date\t\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%' OR char.fast_charger_brand = 'Tesla')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;",
"rawSql": "SELECT\n\tCOALESCE(sum(cp.cost),0)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nJOIN\n charges char ON char.charging_process_id = cp.id AND char.date = end_date\t\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%' OR char.fast_charger_brand = 'Tesla')\n\tAND NULLIF(char.charger_phases, 0) IS NULL\n\tAND char.fast_charger_type != 'ACSingleWireCAN'\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;",
"refId": "A",
"select": [
[
Expand Down Expand Up @@ -2546,4 +2546,4 @@
"uid": "-pkIkhmRz",
"version": 8,
"weekStart": ""
}
}

0 comments on commit d3cca5a

Please sign in to comment.