diff --git a/README.md b/README.md index 9479da59..6d20c911 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Ready to install? Use the [Quickstart](https://solarthing.readthedocs.io/en/late * Grafana (recommended) * Use SolarThing Server (with CouchDB) alongside [Wild GraphQL Data Source](https://grafana.com/grafana/plugins/retrodaredevil-wildgraphql-datasource/) + * Documentation: https://solarthing.readthedocs.io/en/latest/quickstart/data/solarthing-server/index.html * Alternatively, configure SolarThing to upload to InfluxDB for viewing of statistics in Grafana * [SolarThing Android](https://play.google.com/store/apps/details?id=me.retrodaredevil.solarthing.android) * SolarThing Android connects directly to CouchDB to display data in a persistent notification diff --git a/docker/README.md b/docker/README.md index aac74b91..156aab7d 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,5 +1,12 @@ # docker This directory is used to contain `Dockerfile`s to build `solarthing` and `solarthing-server` docker images. + +NOTE: If you are looking for documentation, go here: https://solarthing.readthedocs.io/en/latest/quickstart/install/docker.html + + + +## Technical details about this directory + Note that this directory is designed to be separate from the state of a codebase at any given commit. Even while building docker images for older SolarThing versions, the latest files in this folder should be used to build those images. diff --git a/server/src/main/java/me/retrodaredevil/solarthing/rest/graphql/service/SolarThingGraphQLBatteryRecordService.java b/server/src/main/java/me/retrodaredevil/solarthing/rest/graphql/service/SolarThingGraphQLBatteryRecordService.java index d7b11559..4d67afa6 100644 --- a/server/src/main/java/me/retrodaredevil/solarthing/rest/graphql/service/SolarThingGraphQLBatteryRecordService.java +++ b/server/src/main/java/me/retrodaredevil/solarthing/rest/graphql/service/SolarThingGraphQLBatteryRecordService.java @@ -19,6 +19,7 @@ import java.time.Duration; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -99,6 +100,9 @@ public SolarThingBatteryEstimate(List> queryEstimate(@GraphQLArgument(name = "ratio") double ratio) { + if (data.isEmpty()) { + return Collections.emptyList(); + } var first = data.get(0); var last = data.get(data.size() - 1);