fix timestamp - 2

This commit is contained in:
Joerg Lehmann 2021-12-17 20:49:06 +01:00
parent 8e4bc7a02b
commit e0b5b2498b
1 changed files with 0 additions and 6 deletions

View File

@ -513,12 +513,6 @@ func getLastMetrics(deveui string) OneMetric {
s := strings.Split(scanner2.Text(), ",")
fmt.Printf("BlaBla: %v, elements: %d\n", s, len(s))
if (len(s) >= 12) && !(strings.HasPrefix(s[5], "_")) {
t, err := time.Parse(time.RFC3339, s[5])
if err != nil {
fmt.Printf("error converting time: %s\n", s[5])
continue
}
res.BatteryPercent = strconv.Itoa(vbat2percent(s[len(s)-1]))
res.BatteryPercentHTML = template.HTML(vbat2html(s[len(s)-1]))
}