13 lines
297 B
Go
Raw Normal View History

2025-03-05 12:53:57 -05:00
package config
// If the weather-station has a mapping, returns the new
// name for the sensor
func (ws *WeatherStation) MapSensor(sensor string) string {
for name, replacement := range ws.SensorMappings {
if name == sensor && replacement != "" {
return replacement
}
}
return sensor
}