current doesnt work with xargs function but with day it does

66 views
Skip to first unread message

enu...@gmail.com

unread,
Jul 26, 2023, 9:15:51 AM7/26/23
to weewx-user
I have in xagss thanks to Tom Keller who was the one who did the following:

 'historical_hour_avg': "SELECT avg({obs_type}) FROM {table} "
                                   "WHERE STRFTIME('%m-%d-%H', datetime, 'unixepoch', 'localtime') "
                                    "= '{month:02d}-{day:02d}-{hour:02d}'",

to calculate the average historical temperature of that day at that time.
If I use day.outTemp.historical_hour_avg the hour it uses is 0:00 which is not what I want.
If I use current.outTemp.historical_hour_avg it does nothing. It doesn't show an error or give any results.
How can I pass the current time to xagss and why doesn't it work with $current?

Tom Keffer

unread,
Jul 26, 2023, 7:46:20 PM7/26/23
to weewx...@googlegroups.com
I'm confused. The key "historical_hour_avg" is not in weewx-xaggs. It can only do full days, not hours.

Is this something you wrote?

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8ab23a4c-d49b-4a0e-9570-6fd2f6212f4bn%40googlegroups.com.

enu...@gmail.com

unread,
Jul 27, 2023, 8:25:37 AM7/27/23
to weewx-user
no, it's from a solution you gave me here. An extension of historical_avg to the hour level, the query is on the first message, but that's not what's important. The bottom line is that if I use $day.historical_hour_avg it works with the time 0:00 but if I use $current to get the current time it doesn't.

Tom Keffer

unread,
Jul 27, 2023, 10:06:22 AM7/27/23
to weewx...@googlegroups.com
If you say so. I don't remember this. 

Reply all
Reply to author
Forward
0 new messages