Perhaps you might suggest a wording change to the commentary in units.py
that works for you as a Github issue ????
I could not find anything in the FAQ nor Customization Guide that suggests
using extensions.py as a best practice. There are some examples in there,
but I could not find any suggestion of what 'typically' would be a
recommended method.
On Wednesday, November 5, 2025 at 9:21:04 AM UTC-8 Werner Krenn wrote:
> That's why I asked the question.
>
> from units.py
>
>
>
> *# This data structure maps observation types to a "unit group"# We start
> with a standard object group dictionary, but users are# free to extend
> it:obs_group_dict = ListOfDicts({*
>
> Then perhaps it would be advisable to write in units.py that it makes more
> sense to enter additional "observation types" in "extensions.py".
>
> Graham Eddy schrieb am Mittwoch, 5. November 2025 um 00:58:32 UTC+1:
>
>> stregthening tom’s words, it *should* be added to extensions.py rather
>> than *in addition* to units.py.
>> units.py is part of weewx’s code base and subject to updates.
>> extensions.py is the hook to allow custom changes to weewx code base and is
>> not changed by weewx updates.
>> *⊣GE⊢*
>>
>> On 5 Nov 2025, at 4:53 am, Tom Keffer <[email protected]> wrote:
>>
>> If you added the additional fields in extensions.py you should be OK.
>> That file is imported before starting processing.
>>
>> On Tue, Nov 4, 2025 at 9:16 AM 'Werner Krenn' via weewx-user <
>> [email protected]> wrote:
>>
>>> Tom
>>> thanks, it worked.
>>>
>>> *I have another question:*
>>>
>>> I'm using additional fields, e.g., "co2_Temp" with the group
>>> "group_temperature". To ensure this field is also converted, I'm adding
>>> these fields and their group assignments to "units.py".
>>>
>>> Could this assignment also be entered into "extensions.py" so that the
>>> conversion is performed?
>>>
>>
>>
--
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 visit
https://groups.google.com/d/msgid/weewx-user/448d56bc-5265-4daa-8679-9d27f00f24cen%40googlegroups.com.