Hmmm, that should work.

Please show more of the log. Set debug=1, restart weewxd, let it run
through the first archive interval, post the log.

Also, what are you using for the tag? It should be
$day.radiation.sum.kilo_watt_per_meter_squared

Just a note: if you're summing radiation over a day, you're really getting
units of energy, not power. You should multiply by the length of the day in
hours to get kWh/m².





On Sun, Apr 9, 2023 at 1:04 AM František Slimařík <[email protected]>
wrote:

> 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'
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/4ab39331-7aef-414a-a3e4-2d35d3fd23ban%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/4ab39331-7aef-414a-a3e4-2d35d3fd23ban%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zECbNT1kCEcAQ%2Bh_7E7eGVNX_pR9oC_X_s%3DREab-Db2B8Q%40mail.gmail.com.

Reply via email to