Change unit from "cb" to "%" for WH51

71 views
Skip to first unread message

Thomas Hackler

unread,
Mar 21, 2022, 8:49:57 AM3/21/22
to weewx-user
Hello,
I want to change the unit from my WH51 moisture sensor from "cb" to "%" and I don't know how to do it.
In the unit group group_moisture there is only centibar available. How can I tell weewx to use the unit group group_percentage for soilMoist1 ?
To modify the unit.py

    "soilMoist1"                : "group_moisture",

is not a good idea I think because I will loose the change after an update? So I guess I have to add something in the extensions.py or can I fix it in the weewx.conf ?

It is possible to add this to the extensions.py?

import weewx.units
weewx.units.obs_group_dict['soilMoist1'] = 'group_percent'

Maybe my problem is still solved but after google some hours and looking in the documentation I did not find how I can fix it and I want to ask before I modify things I don't really understand. Thank you!
Regards
Thomas

Graham Eddy

unread,
Mar 21, 2022, 9:56:24 AM3/21/22
to weewx...@googlegroups.com
i do this
 Graham Eddy 

Thomas Hackler

unread,
Mar 21, 2022, 12:44:44 PM3/21/22
to weewx-user
it works, thank you!
Reply all
Reply to author
Forward
0 new messages