Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-09-16 Thread Tom Keffer
Turned out allowing iterators to use data bindings was an easier problem than I thought. Fixed in commit b50fe45 Now you can do something like #for $day in $month.days

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread gjr80
There is nothing that will directly give you the first of the month. The closest you can do is $days_ago: $day($data_binding=‘some binding’, $days_ago=20).outTemp.maxtime But of course as we move through the month the actual day provided will change. You could use a little in-line python in

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Rahul Bedi
BTW if I was to manually replace $day with a variable that is, say, the first day of the month ? How would I do that ? I am trying to remove the loop and replace that with 31 lines that will be one for each possible date. Thx. - Rahul On Tue, Jun 30, 2020 at 7:28 PM Rahul Bedi wrote: >

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Rahul Bedi
Thanks Tom and Gary. The only other way I can think of is to do the kludgy way of removing the loop altogether and doing it 31 times for the month :(. Not pretty but had to do that in hilo.inc - Rahul On Tue, Jun 30, 2020 at 7:14 PM Tom Keffer wrote: > Yes, this is a limitation in the

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Tom Keffer
Yes, this is a limitation in the iterators: they cannot use a data binding. There's probably a workaround, but I'd have to think about it a bit. In the meantime, I've put up issue #580 to track. Probably related to issue #384

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread gjr80
I think I see what is going on. Normally you can pass a $data_binding to a $day tag to pull an aggregate from another database. However, in this case the $day tag is not a normal $day tag but rather it comes from iterating over all of the days in the month (for $day in $month.days) and you

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Rahul Bedi
Tried. I get a similar error: Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR weewx.cheetahgenerator: Generate failed with exception '' Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR weewx.cheetahgenerator: Ignoring template /etc/weewx/skins/Seasons/NOAA/NOAA--MM.txt.tmpl