as tom indicates, the actual data in the database is in some units we do not 
need to care about, all we care about is how the data is presented.
rather than update weewx source code (units.py), just override it in your 
~weewx/$station/bin/user/extensions.py:
weewx.units.MetricUnits['group_rain']           = 'mm'
weewx.units.MetricUnits['group_rainrate']       = 'mm_per_hour'
⊣GE⊢

> On 29 Jun 2025, at 11:33 am, Tom Keffer <[email protected]> wrote:
> 
> See option target_unit 
> <https://www.weewx.com/docs/5.1/reference/weewx-options/stdconvert/#target_unit>.
> 
> On Sat, Jun 28, 2025 at 6:28 PM Alan <[email protected] 
> <mailto:[email protected]>> wrote:
>> I there anyway you can modify the units the data is written with to the 
>> weewx archive database by modifying weewx.conf?
>> 
>>  I am not talking about the units in the reports.
>> 
>> For example, in New Zealand we use metric but want the rain in mm (not cm) 
>> and the wind in km_per_hour.
>> 
>> The only way I have found of doing this is to edit the METRIC dictionary in 
>> units.py.
>> 
>> This works fine but a version update in the linux repo could overwrite it.
>> 
>> (reason: I have other applications using this data).
>> 
>> Thanks
>> Alan
>> 
>> -- 
>> 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] 
>> <mailto:[email protected]>.
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/weewx-user/5ea87391-6ea4-45c7-be7c-53ef2049c5f4n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/5ea87391-6ea4-45c7-be7c-53ef2049c5f4n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion visit 
> https://groups.google.com/d/msgid/weewx-user/CAPq0zECxQERh25vU7CtN%2B4Pfvj_Z2-dmYBZY9RQfLj8yVRngCw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/weewx-user/CAPq0zECxQERh25vU7CtN%2B4Pfvj_Z2-dmYBZY9RQfLj8yVRngCw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/39B1230B-0E74-46E2-8988-6C5BD1748DB7%40geddy.au.

Reply via email to