lestoitsduval/layouts/partials/monitoring.html

19 lines
976 B
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ $json := getJSON "https://monitoringapi.solaredge.com/site/2516130/overview?api_key=GVF1BZAAM74IRDZ2WRWT32A5V0CY9G4Z&format=json" }}
{{ $lastDayData := $json.overview.lastDayData.energy }}
{{ $lastMonthData := $json.overview.lastMonthData.energy }}
{{ $lifeTimeData := $json.overview.lifeTimeData.energy }}
{{ $lastUpdateTime := $json.overview.lastUpdateTime }}
<table class="monitoring">
<tr>
<th colspan="3">Production Greyzolon Duluth</th>
</tr>
<tr>
<td>Energie du jour<strong>{{ lang.NumFmt 2 (div $lastDayData 1000) "- . ," }} kWh</strong></td>
<td>Energie du mois<strong>{{ lang.NumFmt 2 (div $lastMonthData 1000000) "- . ," }} MWh</strong></td>
<td>Production totale<strong>{{ lang.NumFmt 2 (div $lifeTimeData 1000000) "- . ," }} MWh</strong></td>
</tr>
<tr>
<td class="date" colspan="3">{{ $lastUpdateTime | time.Format ":date_medium" }} à {{ replace ($lastUpdateTime | time.Format ":time_short") ":" "h" }}</td>
</tr>
</table>