Thank you.
On Tue, Sep 29, 2020 at 1:05 PM Tom Keffer <[email protected]> wrote: > Commit 73d8d2 > <https://github.com/weewx/weewx/commit/73d8d2c89f3763019f1e314db85018dad744bf38> > > > On Tue, Sep 29, 2020 at 4:31 AM Tom Keffer <[email protected]> wrote: > >> Yes, it should be possible. Unfortunately, there's not much documentation >> about aggregations taking a value, and what little there is, is wrong! >> >> On Mon, Sep 28, 2020 at 10:35 PM Chris Davies-Barnard < >> [email protected]> wrote: >> >>> Thanks Tom. >>> >>> Should I have been able to glean this from the documentation? >>> >>> If not, could the documentation be updated to show the inputs required? >>> Something in keeping with or similar to the main Python documentation. >>> >>> Thanks again for the excellent support. >>> >>> Chris >>> >>> On Monday, September 28, 2020 at 11:07:14 PM UTC+1 [email protected] >>> wrote: >>> >>>> The aggregate type sum_ge() actually takes a ValueTuple as an argument, >>>> not a single float. As a convenience, for some types, it can be shortened >>>> to a 2-way tuple. So, you want >>>> >>>> $month.rain.sum_ge((1.0, 'mm')) >>>> >>>> -tk >>>> >>>> >>>> >>>> On Mon, Sep 28, 2020 at 12:07 PM Chris Davies-Barnard < >>>> [email protected]> wrote: >>>> >>>>> Evening all, >>>>> >>>>> From the http://www.weewx.com/docs/customizing.htm#aggregation_types >>>>> page I believe the following should work for months with equivalents >>>>> working for weeks and years. >>>>> >>>>> $month.rain.sum_ge(1.0) >>>>> >>>>> and thus provide me with a value comparable to the MET Office Climate >>>>> Averages. >>>>> >>>>> https://www.metoffice.gov.uk/research/climate/maps-and-data >>>>> >>>>> but at the moment I'll getting an error: >>>>> >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/tags.py", line >>>>> 326, in sum_ge >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** return self._do_query('sum_ge', val=val) >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/tags.py", line >>>>> 364, in _do_query >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** db_manager, val=val, **self.option_dict) >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/xtypes.py", >>>>> line 102, in get_aggregate >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** **option_dict) >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/xtypes.py", >>>>> line 422, in get_aggregate >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** if len(val) == 2: >>>>> Sep 28 20:05:44 pecan-ubuntu wee_reports[30045] ERROR >>>>> weewx.cheetahgenerator: **** TypeError: object of type 'float' has no >>>>> len() >>>>> >>>>> and a different error if I wrap 1.0 in quotes. >>>>> >>>>> How am I getting this wrong? >>>>> >>>>> Chris >>>>> >>>>> -- >>>>> 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/13789d5f-eb48-4309-89f8-3af3e8759adbn%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/weewx-user/13789d5f-eb48-4309-89f8-3af3e8759adbn%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> 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/1bbf6d1f-bd4c-4e68-a5de-bff2a190a3f7n%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/1bbf6d1f-bd4c-4e68-a5de-bff2a190a3f7n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "weewx-user" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/weewx-user/n5OKwM7Q2_U/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/CAPq0zEBw7FrJfQFAxesLL5U3PQvUi3%3Dnq_j%3DaMah7%3DF0tLJU1Q%40mail.gmail.com > <https://groups.google.com/d/msgid/weewx-user/CAPq0zEBw7FrJfQFAxesLL5U3PQvUi3%3Dnq_j%3DaMah7%3DF0tLJU1Q%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CAJ8Kp%2BsMv-QH-U8T1Rcv%3DY93s%3DEPgG%2BvunFGtmXh2u9bvbk_TQ%40mail.gmail.com.
