do not send alerts when there are no metrics
This commit is contained in:
@@ -284,6 +284,8 @@ func vbat2percent(vbat string) int {
|
||||
func getLastMetrics(deveui string) OneMetric {
|
||||
var res OneMetric
|
||||
|
||||
res.BatteryPercent = "999"
|
||||
|
||||
url := "http://localhost:8086/api/v2/query?org=wobischorg"
|
||||
data := []byte(fmt.Sprintf(`from(bucket:"wobischbucket")
|
||||
|> range(start:-5d)
|
||||
|
||||
Reference in New Issue
Block a user