I see now there have been some changes have been introduced in WeeWX v4.6.x to how default labelling and formatting of observation types is determined and it appears that group_energy/watt_hour may have fallen through the cracks. I think we can work around the issue in your case by adding some additional lines to user/extensions.py:
weewx.units.default_unit_format_dict['watt_hour'] = '%.1f' weewx.units.default_unit_label_dict['watt_hour'] = u' Wh' Again you will need to restart WeeWX for the changes to take effect and hopefully the first report cycle should add you missing units/formatting. Gary On Tuesday, 15 February 2022 at 04:18:53 UTC+10 [email protected] wrote: > Hi Gary, unfortunately your tip did not work. "signal1" still has no unit. > Before the update it still did. > > gjr80 schrieb am Montag, 14. Februar 2022 um 01:58:29 UTC+1: > >> Making changes to units.py is a poor approach to dealing with problems >> and should be avoided, at best your changes will not survive a WeeWX >> upgrade; at worst your changes could unknowingly cause problems elsewhere >> with WeeWX. >> >> If you wish to assign an observation type to a unit group this is best >> done through the user/extensions.py file. user/extensions.py is intended >> for users to add code that is to be run during the WeeWX startup and allows >> user changes to the WeeWX environment to be made in a safe manner. Files in >> the user directory are protected during a WeeWX upgrade and will not be >> overwritten. I suggest you revert your changes to units.py and try >> adding the following to user/extensions.py (untested): >> >> import weewx.units >> weewx.units.obs_group_dict['signal1'] = 'group_energy' >> >> Save extensions.py and restart WeeWX. Does that fix your problem? >> >> Gary >> On Monday, 14 February 2022 at 01:14:14 UTC+10 [email protected] wrote: >> >>> Hello all, >>> >>> I have updated this weekend to WeeWX version 4.6.2. Actually everything >>> works as usual, but in my photovoltaic data no units are displayed anymore. >>> I have changed the assignment in the units.py as follows "signal1" : >>> "group_energy", but without success. >>> >>> Who knows advice? >>> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/dcb7360c-543c-4ace-98d5-2a68c3f316den%40googlegroups.com.
