You’re overthinking this one. All you need to do is replace the ‘example’ sensor device id with ‘your’ sensor device id. So if you are ST-12345678 then you would simply need to…
outTemp = air_temperature.ST-00000025.obs_st
outTemp = air_temperature.ST-12345678.obs_st
(and similarly edit the other lines in the sensor_map)
longer commentary for future folks asking the same question....
WeeWX is super-flexible, supporting dozens of station types as well as user-developed sensors. With great flexibility comes a little of a learning curve.
All a sensor_map does is tell weewx:
- which measurement
- from which sensor
- should be saved into which weewx database element
- there are over 100 database elements in the db so weewx can support a zillion station variants
- users are able to create all kinds of custom solutions for themselves…and they ‘do’ so
- so a ‘little’ configuration is required in order to support all this flexibility weewx gives you
For @vreihen’s weewx WF driver specifically:
- it supports multiple Air, Sky, Tempest sensors attached to one Hub
- so if you have multiple sensors (many people do), you have to tell weewx which one to use for what
For 95% of the folks, just editing in your sensor id, replacing the example one, is all you need to do. Really.
For the other 5% you have the ability to do things like:
- use Tempest ST-12345678 for wind speed
- use Sky SK-234256789 for uv readings
- use Air AR-34567890 for outside temperature
- (and so on, in any combination you choose to set up to match your needs)
But for the default case, the example stanza will work for you ‘if’ you replace the example device id with the one for your unique sensor. It’s really that simple.