battery type should be unsigned
This commit is contained in:
parent
2095a29c53
commit
a1cdaf9b18
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ func ParseCleargrassSensorData(writeAPI *influxdb2_api.WriteAPI, logger *zap.Log
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
battery := int(eventData[0])
|
battery := uint8(eventData[0])
|
||||||
|
|
||||||
point := influxdb2.NewPointWithMeasurement("battery")
|
point := influxdb2.NewPointWithMeasurement("battery")
|
||||||
point.SetTime(timestamp)
|
point.SetTime(timestamp)
|
||||||
|
@ -108,7 +108,7 @@ func ParseCleargrassSensorData(writeAPI *influxdb2_api.WriteAPI, logger *zap.Log
|
||||||
zap.String("description", description),
|
zap.String("description", description),
|
||||||
zap.String("measurement", "battery"),
|
zap.String("measurement", "battery"),
|
||||||
zap.String("measurement_unit", "%"),
|
zap.String("measurement_unit", "%"),
|
||||||
zap.Int("value", battery))
|
zap.Uint8("value", battery))
|
||||||
|
|
||||||
default:
|
default:
|
||||||
logger.Warn("unknown event type",
|
logger.Warn("unknown event type",
|
||||||
|
|
Loading…
Reference in a new issue