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 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.

Reply via email to