Hi Gary, 

indeed this solved my issue with the conversion! Great! I've read about it 
in the documentations but was not able to figure it out all the way..
Can you please explain how to solve the issue with too many numbers after a 
comma in lightning_strikes? It counts strikes as it should but the output 
in my html always shows for example 35,000000 when it should be more 
appropriate with only 35. Strange because in the cell of the database it 
shows with only one decimal....

Thanks for fixing the conversion issue, helped alot!

Mikael


Den torsdag 11 juli 2019 kl. 21:54:33 UTC+2 skrev gjr80:
>
> When you add a new field (observation) to the archive WeeWX needs to know 
> how to handle unit conversion and formatting of data in the field. This is 
> done using WeeWX unit groups; for example, temperature based fields are 
> normally assigned the WeeWX unit group group_temperature. In the case of a 
> distance based field it may be appropriate to use the group group_distance. 
> There are a number of ways to make such an assignment but in this case the 
> easiest approach is to add the following code to the bottom of 
> extensions.py (located in /home/weewx/bin/users if WeeWX was installed 
> using setup.py otherwise in /usr/share/weewx/users):
>
> import weewx.units
> weewx.units.obs_group_dict['avg_distance'] = 'group_distance'
>
> Save extensions.py and then restart WeeWX. WeeWX tags using the 
> avg_distance field should now have correct formatting and unit conversion 
> (note default formats, units and labels for a report are set in either 
> skin.conf or the weewx.conf [StdReport) stanza).
>
> You can read further about adding fields and setting unit groups in the 
> Customization Guide - 
> http://weewx.com/docs/customizing.htm#customizing_units
>
> In this case we were able to assign an appropriate existing unit group, if 
> no suitable unit group existed we would need to create the appropriate unit 
> conversion formulae as well as default labelling and formatting settings.
>
> Gary
>
>

-- 
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/e1e1ec04-df44-411b-8b39-d7cb7ca809b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to