After much time, I've done it!
The following is my "CookBook" step-by-step, as to add new Units Group to Dictionary:
Example, consider adding new Group "illuminance" with Unit 'lux' (lx),
after adding 'illuminance' data to Extended Database.
1) Edit 'belchertown.py' or associated '
driverfile.py'
file - according to your hardware - that will run upon weewx start (a driver file may makes sense, as it contains the Extension/data variable associated with the
Unit)
% cd /usr/share/weewx/user
% nano
driverfile.pyadd the following (modifying accordingly to your new Group and Unit):
import weewx.units (might be already in file)
weewx.units.obs_group_dict['illuminance'] = 'group_illuminance'
weewx.units.USUnits['group_illuminance'] = 'lux'
weewx.units.MetricUnits['group_illuminance'] = 'lux'
weewx.units.MetricWXUnits['group_illuminance'] = 'lux'
weewx.units.default_unit_format_dict['lux'] = '%.0f'
weewx.units.default_unit_label_dict['lux'] = ' lx'
2) Edit 'weewx.conf' and 'skin.conf' adding new Group and Unit accordingly
3) Restart weewx
http://www.weewx.com/docs/customizing.htm#Creating_a_new_unit_group
Xant