Example unit and unit customization - bellrichm/WeeWX-MQTTSubscribe GitHub Wiki
Customizing units and unit groups
Experimental, maybe removed
Assumes understanding of this part of customizing WeewX https://weewx.com/docs/5.0/custom/units/#creating-a-new-unit-group
[MQTTSubscribeDriver or MQTTSubscribeService]
[weewx](/bellrichm/WeeWX-MQTTSubscribe/wiki/weewx)
[[observations](/bellrichm/WeeWX-MQTTSubscribe/wiki/[observations)]
# Specify group. (Step 1)
force = group_force
[[units](/bellrichm/WeeWX-MQTTSubscribe/wiki/[units)]
# Specify what unit is used to measure force in the three standard unit systems used by weewx. (Step 2)
[[[pound](/bellrichm/WeeWX-MQTTSubscribe/wiki/[[pound)]]
unit_system = us
group = group_force
# Specify format to use. (Step 3)
format = '%.1f'
# Specify label to use. (Step 3)
label = pound
# Specify how to convert. (Step 4)
[[[[conversion](/bellrichm/WeeWX-MQTTSubscribe/wiki/[[[conversion)]]]
newton = lambda x : x * 4.44822
# Specify what unit is used to measure force in the three standard unit systems used by weewx. (Step 2)
[[[newton](/bellrichm/WeeWX-MQTTSubscribe/wiki/[[newton)]]
unit_system = metric, metricwx
group = group_force
# Specify format to use. (Step 3)
format = %.1f
# Specify label to use. (Step 3)
label = newton
[[[[conversion](/bellrichm/WeeWX-MQTTSubscribe/wiki/[[[conversion)]]]
# Specify how to convert. (Step 4)
pound = lambda x : x * 0. 224809