Consolidate battery metrics
This commit is contained in:
		| @@ -39,32 +39,46 @@ func MapAwnUpdate(awnUpdate *AmbientWeatherUpdate) *weather.WeatherUpdate { | ||||
| 	} | ||||
|  | ||||
| 	return &weather.WeatherUpdate{ | ||||
| 		StationType:       awnUpdate.StationType, | ||||
| 		DateUTC:           &updateTime, | ||||
| 		TempOutdoorF:      awnUpdate.TempF, | ||||
| 		HumidityOudoor:    awnUpdate.Humidity, | ||||
| 		WindSpeedMPH:      awnUpdate.WindGustMPH, | ||||
| 		WindGustMPH:       awnUpdate.WindGustMPH, | ||||
| 		MaxDailyGust:      awnUpdate.MaxDailyGust, | ||||
| 		WindDir:           awnUpdate.WindDir, | ||||
| 		WindDirAvg10m:     awnUpdate.WindDirAVG10m, | ||||
| 		UV:                awnUpdate.UV, | ||||
| 		SolarRadiation:    awnUpdate.SolarRadiation, | ||||
| 		HourlyRainIn:      awnUpdate.HourlyRainIn, | ||||
| 		EventRainIn:       awnUpdate.EventRainIn, | ||||
| 		DailyRainIn:       awnUpdate.DailyRainIn, | ||||
| 		WeeklyRainIn:      awnUpdate.WeeklyRainIn, | ||||
| 		MonthlyRainIn:     awnUpdate.MonthlyRainIn, | ||||
| 		YearlyRainIn:      awnUpdate.YearlyRainIn, | ||||
| 		TotalRainIn:       awnUpdate.TotalRainIn, | ||||
| 		BattOutdoorSensor: awnUpdate.BattOut, | ||||
| 		BattIndoorSensor:  awnUpdate.BattIn, | ||||
| 		BattRainSensor:    awnUpdate.BattRain, | ||||
| 		BattCO2Sensor:     awnUpdate.BattCO2, | ||||
| 		TempIndoorF:       awnUpdate.TempInF, | ||||
| 		HumidityIndoor:    awnUpdate.HumidityIn, | ||||
| 		BaromRelativeIn:   awnUpdate.BaromRelIn, | ||||
| 		BaromAbsoluteIn:   awnUpdate.BaromAbsIn, | ||||
| 		StationType:    awnUpdate.StationType, | ||||
| 		DateUTC:        &updateTime, | ||||
| 		TempOutdoorF:   awnUpdate.TempF, | ||||
| 		HumidityOudoor: awnUpdate.Humidity, | ||||
| 		WindSpeedMPH:   awnUpdate.WindGustMPH, | ||||
| 		WindGustMPH:    awnUpdate.WindGustMPH, | ||||
| 		MaxDailyGust:   awnUpdate.MaxDailyGust, | ||||
| 		WindDir:        awnUpdate.WindDir, | ||||
| 		WindDirAvg10m:  awnUpdate.WindDirAVG10m, | ||||
| 		UV:             awnUpdate.UV, | ||||
| 		SolarRadiation: awnUpdate.SolarRadiation, | ||||
| 		HourlyRainIn:   awnUpdate.HourlyRainIn, | ||||
| 		EventRainIn:    awnUpdate.EventRainIn, | ||||
| 		DailyRainIn:    awnUpdate.DailyRainIn, | ||||
| 		WeeklyRainIn:   awnUpdate.WeeklyRainIn, | ||||
| 		MonthlyRainIn:  awnUpdate.MonthlyRainIn, | ||||
| 		YearlyRainIn:   awnUpdate.YearlyRainIn, | ||||
| 		TotalRainIn:    awnUpdate.TotalRainIn, | ||||
| 		Batteries: []weather.BatteryStatus{ | ||||
| 			{ | ||||
| 				Component: "OutdoorSensor", | ||||
| 				Status:    awnUpdate.BattOut, | ||||
| 			}, | ||||
| 			{ | ||||
| 				Component: "IndoorSensor", | ||||
| 				Status:    awnUpdate.BattIn, | ||||
| 			}, | ||||
| 			{ | ||||
| 				Component: "RainSensor", | ||||
| 				Status:    awnUpdate.BattRain, | ||||
| 			}, | ||||
| 			{ | ||||
| 				Component: "CO2Sensor", | ||||
| 				Status:    awnUpdate.BattCO2, | ||||
| 			}, | ||||
| 		}, | ||||
| 		TempIndoorF:     awnUpdate.TempInF, | ||||
| 		HumidityIndoor:  awnUpdate.HumidityIn, | ||||
| 		BaromRelativeIn: awnUpdate.BaromRelIn, | ||||
| 		BaromAbsoluteIn: awnUpdate.BaromAbsIn, | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user