Can't help you with the Belchertown specifics, but assuming you want WeeWX to support l/m2 and l/m2/h for rain and rain rate, at a minimum you will need to add appropriate entries to weewx.units.conversionDict <https://github.com/weewx/weewx/blob/master/src/weewx/units.py#L346>. This cannot be done through weewx.conf and needs to be done via some python code. This can be done in a number of ways, but in your case adding some entries to extensions.py is probably easiest and quickest. You want something like step 4 here <https://weewx.com/docs/5.1/custom/units/#creating-a-new-unit-group>. Note that as you are adding a new unit to group_rain and group_rainrate you will need to add entries to the existing conversionDict entries for each group_rain and group_rainrate unit, ie: 'mm', 'cm', 'inch', 'mm_per_hour', 'cm_per_hour' and 'inch_per_hour'.
You could also add default formats and unit labels for your new units to weewx.units.default_unit_format_dict and weewx.units.default_unit_label_dict respectively. This is not essential to use your new units in WeeWX reports and plots, not sure about Belchertown though. Gary On Friday, 30 May 2025 at 20:20:33 UTC+10 [email protected] wrote: > I probably should add that I use the Belchertown skin ;) > and would like to display the rain & rate there in l / m2 and l / m2 / h > with the station_observations. > On Friday, May 30, 2025 at 9:51:55 AM UTC+2 Stefan Gliessmann wrote: > >> Dear all, >> >> I always struggle when I want to change the unit of a certain entity. >> This time, it is rain and rain rate. The WeeWX default is cm and cm/h, >> respectively. >> I would like to change it to l / m2 and l /m2 / h. >> The calculation seems straight forward as 1 mm rain = 1 liter / m2 rain >> and its rate accordingly as 1 mm / h = 1 l/(m2 h). >> Do I add this as a new label in weewx.conf under [Units] or do I add a >> new unit in extensions.py as per https://weewx.com/docs/5.1/custom/units/ >> ? >> >> Any help / hint would be highly appreciated! >> >> TIA, >> Stefan >> > -- 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/718f50a1-5cac-4b6c-b76f-27ffa97444e2n%40googlegroups.com.
