When you add a new field (observation) to the archive WeeWX needs to know how to handle unit conversion and formatting of data in the field. This is done using WeeWX unit groups; for example, temperature based fields are normally assigned the WeeWX unit group group_temperature. In the case of a distance based field it may be appropriate to use the group group_distance. There are a number of ways to make such an assignment but in this case the easiest approach is to add the following code to the bottom of extensions.py (located in /home/weewx/bin/users if WeeWX was installed using setup.py otherwise in /usr/share/weewx/users):
import weewx.units weewx.units.obs_group_dict['avg_distance'] = 'group_distance' Save extensions.py and then restart WeeWX. WeeWX tags using the avg_distance field should now have correct formatting and unit conversion (note default formats, units and labels for a report are set in either skin.conf or the weewx.conf [StdReport) stanza). You can read further about adding fields and setting unit groups in the Customization Guide - http://weewx.com/docs/customizing.htm#customizing_units In this case we were able to assign an appropriate existing unit group, if no suitable unit group existed we would need to create the appropriate unit conversion formulae as well as default labelling and formatting settings. Gary -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/35f2f581-d03a-476f-9102-e2a355fa2d6a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.