I have a dictionary that contains 'outTemp' among other things for the function, that is passed to the function that retrieves the timespan binder. I think that Gary's solution will work, I shouldn't ask questions at the end of the day, the solution always ends up being obvious when I do!
Any thoughts on the query needing to be run 3 times before I get any data? On Fri, Jun 30, 2017 at 7:37 AM, Thomas Keffer <[email protected]> wrote: > I'm not understanding the "array['valid_data_source']" syntax either. > > Read the section in the Customizing Guide about how these tags work > <http://weewx.com/docs/customizing.htm#defining_new_tags>. The expression > stats.day() actually returns a TimespanBinder object. This object has a > __getattr__ function defined on it. This function gets called when > evaluating stats.day().outTemp with argument 'outTemp'. There is no array > involved --- it's all attribute expressions. > > -tk > > On Thu, Jun 29, 2017 at 8:05 PM, Thomas Carlin <[email protected]> > wrote: > >> Hey Guys, >> >> Finally picking this back up again, and have run into a bit of a snag. I >> think it is a syntax issue, but I can't figure out how to take >> >> latest = stats.day().outTemp.last >> >> and turn it into >> >> latest = stats.day().array['valid_data_source'].last >> >> so I can use it in a function, and pass the necessary parameters. >> >> Also, and please excuse me if this was answered, but the conversation >> went a little over my head, but, the query needs to run 3 times before it >> returns anything but N/A. >> >> Any thoughts? >> >> -- >> 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]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > 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/P0emh6GW40I/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Thomas Carlin 970-401-3805 -- 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]. For more options, visit https://groups.google.com/d/optout.
