/home/weewx/bin/user/extensions.py or /usr/share/weewx/user/extensions.py is the generally recommended location. There are two requirements (1) the code must be in a location such that it is executed each time WeeWX starts and (2) it is advisable to place the code in a location that is not overwritten during a WeeWX upgrade. extensions.py was made for just such cases.
Another alternative if you have written your own driver and the extra fields are tightly linked to that driver is to place the code in the driver. The former always works, the latter always work but may be overwritten depending on the driver. Gary On Friday, 6 October 2023 at 06:57:06 UTC+10 [email protected] wrote: import weewx.units weewx.units.obs_group_dict['extratemp14'] = 'group_temperature' Where to add this, I'm not sure. I think the recommended place is in __init__.py in the bin/user directory. -rich -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/3f6563c1-a170-4782-a986-5f8760461e7an%40googlegroups.com.
