All checks were successful
Build and Publish / release (push) Successful in 4m6s
13 lines
297 B
Go
13 lines
297 B
Go
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
|
|
}
|