Hello,
can somebody gimme guidance where to add following code to allow me extension of units for solar radiation? I´d like to measure amount of radiation per interval and in some cases it´s better to have in kilowatts rather than in watts. Unfortunately adding this into user/extensions.py doesn´t work :)
==========================================
import weewx.units
weewx.units.default_unit_format_dict['kilo_watt_per_meter_squared'] = '%.3f'
weewx.units.default_unit_label_dict['kilo_watt_per_meter_squared'] = ' kW/m²'
weewx.units.conversionDict['watt_per_meter_squared'] = {'kilo_watt_per_meter_squared': lambda x : x * 0.001}
weewx.units.conversionDict['kilo_watt_per_meter_squared'] = {'watt_per_meter_squared': lambda x : x * 1000}
==========================================
Apr 9 09:55:35 new-weather-machine journal: weewx[7799] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'kilo_watt_per_meter_squared' while searching for 'day.radiation.sum.kilo_watt_per_meter_squared'