diff --git a/cmd/smartbridge/main.go b/cmd/smartbridge/main.go index a2f6886..40df2d8 100644 --- a/cmd/smartbridge/main.go +++ b/cmd/smartbridge/main.go @@ -88,7 +88,7 @@ func main() { } // Import and Export values tags = map[string]string{"unit": "Wh"} - fields = map[string]interface{}{"import": reading.Electricity.Import.Current, "export": reading.Electricity.Export.Current} + fields = map[string]interface{}{"import": reading.Electricity.Import.Current.Value, "export": reading.Electricity.Export.Current.Value} if err := influx.Write(cf.Influx.Organization, cf.Influx.Bucket, cf.Influx.Measurement, tags, fields); err != nil { fmt.Fprintf(os.Stderr, "influxdb error: %s\n", err) }