I finally managed to wrap my head around this I think (well it's working!) I looked back at an email I'd seen about this recently and this is the result that I have in my filepile.py. The bit I couldn't wrap my head around until just now was the link between defining the groups and units and connecting them to the database recordings - which was this
weewx.units.obs_group_dict[*'AQI25'*] = *'group_dust'* weewx.units.obs_group_dict[*'AQI100'*] = *'group_dust'* weewx.units.obs_group_dict[*'AQICO2'*] = *'group_gas_concentration'* Anyway problem solved, hopefully this is the right place for it? *import* syslog *import* weewx *import* weewx.units *from* weewx.wxengine *import* StdService *from* weeutil.weeutil *import* to_float weewx.units.USUnits[*'group_gas_concentration'*] = *'ppm'* weewx.units.MetricUnits[*'group_gas_concentration'*] = *'ppm'* weewx.units.MetricWXUnits[*'group_gas_concentration'*] = *'ppm'* weewx.units.default_unit_format_dict[*'ppm'*] = *'%.0f'* weewx.units.default_unit_label_dict[*'ppm'*] = *' ppm'* weewx.units.USUnits[*'group_dust'*] = *'microgramm_per_meter_cubic'* weewx.units.MetricUnits[*'group_dust'*] = *'microgramm_per_meter_cubic'* weewx.units.MetricWXUnits[*'group_dust'*] = *'microgramm_per_meter_cubic'* weewx.units.default_unit_format_dict[*'microgramm_per_meter_cubic'*] = *'%.1f'* weewx.units.default_unit_label_dict[*'microgramm_per_meter_cubic'*] = *' \xce\xbcg/m\xc2\xb3'* weewx.units.obs_group_dict[*'AQI25'*] = *'group_dust'* weewx.units.obs_group_dict[*'AQI100'*] = *'group_dust'* weewx.units.obs_group_dict[*'AQICO2'*] = *'group_gas_concentration'* On Mon, May 13, 2019 at 9:15 AM Colin Larsen <[email protected]> wrote: > Hi all > > I am successfully using FilePile to gather some air quality data and add > it to my Weewx database. Upon using the tag $current.AQICO2 it returns the > value in the database with 6 decimal points after it, in the database it is > just a whole number of 672. I know I've something in the formatting > somewhere but can't quite figure it out > > Here is how the data is displayed using my test tag > > > - Test AQM Co2 level is 672.000000 > > Thanks > Colin > -- 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/CACjxfUtOgmRN%3DF2i1CJ_FvGcwmm1sZoTXckW3B86Csme-Xdsfg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
