Move towards selectable time ranges in the dashboard
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

- Add the installation date to frontend and backend
- Add an error page to help with the upgrade from the previous version
- Avoid querying history if installation date is not set
- Make the fillMissing function work for periods of different lenght than than 8 days
This commit is contained in:
MassiveBox 2022-12-04 12:50:11 +01:00
parent 66e2a2de1a
commit 6dc8fa3750
8 changed files with 61 additions and 21 deletions

View file

@ -9,6 +9,7 @@ import (
"os"
"regexp"
"strings"
"time"
)
type Config struct {
@ -19,8 +20,9 @@ type Config struct {
}
type HomeAssistant struct {
BaseURL string `json:"base_url"`
ApiKey string `json:"api_key"`
BaseURL string `json:"base_url"`
ApiKey string `json:"api_key"`
InstallationDate time.Time `json:"installation_date"`
}
type Sensors struct {
PolledSmartEnergySummation string `json:"polled_smart_energy_summation"`