It works!!!

Thanks everyone,
Wayne

Here are the required changes:
I added this to extensions.py as suggested by an oldman and Karen K
*/usr/share/weewx/user extensions.py*

*import weewx.units*

*weewx.units.obs_group_dict['windBatteryStatus'] = 
''group_volt'weewx.units.obs_group_dict['luminosity'] = 'group_illuminance'*

I changed the [[stringformats]] in the belchertown skin.conf to get the 
right amount of digits.
*    [[StringFormats]]*
*        #volt                   = %.1f*
*        volt                    = %.2f*


*[image: screen.PNG]*
On Wednesday, March 29, 2023 at 1:52:23 PM UTC-5 Karen K wrote:

> I guess `windBatteryStatus` is not a boolean value (i.e. true or false) 
> but an integer or real value. So you may want to choose another observation 
> group.
>
> The decimal places are set in section [[[[StringFormats]]]] for the 
> respective units (not observation groups).
>
> an oldman schrieb am Mittwoch, 29. März 2023 um 20:08:09 UTC+2:
>
>> Hi
>> this is how i did it.
>> using *WeeWX version: 4.10.1 Seasons version: 4.10.1 Python version: 
>> 3.10.10*
>> *in the user dir is a file extensions.py*
>> *i add*
>> import weewx.units
>> weewx.units.obs_group_dict['windBatteryStatus'] = 'group_boolean'
>> weewx.units.obs_group_dict['luminosity'] = 'group_illuminance'
>> then restart weewx
>>
>> hope this helps
>>
>> On Wednesday, March 29, 2023 at 12:14:53 PM UTC-5 vince wrote:
>>
>>> For this original question:
>>>
>>>    - you're using luminosity and windBatteryStatus which are in the db 
>>>    schema
>>>    - but I can't see how to determine what they map to by default
>>>    - so I can't suggest which [[StringFormats]] edits to make in 
>>>    skin.conf
>>>
>>> This is one where there might not be a simple example documented as far 
>>> as I can tell.
>>>
>>>    - how do you know which [Units] [[Groups]] category a db element is 
>>>    mapped to by default ?
>>>    - how do you change which category a db element is mapped to ?
>>>    - how can you (can you?) add a new units group if the default units 
>>>    don't have anything that matches your needs ?
>>>
>>>
>>>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/4d54dbd3-b1a9-47f8-b2fd-68c49bb1d6d3n%40googlegroups.com.

Reply via email to