--
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/a772675a-4b2c-40cb-8fc2-6e0e81e8f4bfn%40googlegroups.com.


The problem was I had put that section on the day charts. If i put in week or month there no errors but it don't plot anything.
--
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/96003050-8169-41b4-91cc-9dadf59aed18n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/5e2ac174-f98b-47ea-a4a1-cce3ceae565cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/45caefaf-a03b-4fc2-8a6c-17a108b9a4f1n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a5b1bd4a-dc42-44e0-a7a7-256215106348n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ba71942e-d16c-4c3a-a0cd-352d1fef25f5n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/08a26d42-1f89-4bf5-991c-225d7a39bc74n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/023a50f2-aa2e-4c75-b298-53fb0b207558n%40googlegroups.com.
'historical_hour_min': "SELECT min({obs_type}) FROM {table} "
"WHERE STRFTIME('%m-%d-%H', datetime, 'unixepoch', 'localtime') "
"= '{month:02d}-{day:02d}-{hour:02d}'",
'historical_hour_max': "SELECT max({obs_type}) FROM {table} "
"WHERE STRFTIME('%m-%d-%H', datetime, 'unixepoch', 'localtime') "
"= '{month:02d}-{day:02d}-{hour:02d}'",
*** xaggs.py 2021-12-09 07:00:04.000000000 -0800
--- /Users/Shared/weewx/bin/user/xaggs.py 2021-12-12 04:12:45.000000000 -0800
***************
*** 51,56 ****
--- 51,62 ----
"WHERE STRFTIME('%m-%d', dateTime,'unixepoch','localtime') = '{month:02d}-{day:02d}';",
'historical_avg': "SELECT SUM(`wsum`), SUM(`sumtime`) FROM {table}_day_{obs_type} "
"WHERE STRFTIME('%m-%d', dateTime,'unixepoch','localtime') = '{month:02d}-{day:02d}';",
+ 'historical_hour_min': "SELECT min({obs_type}) FROM {table} "
+ "WHERE STRFTIME('%m-%d-%H', datetime, 'unixepoch', 'localtime') "
+ "= '{month:02d}-{day:02d}-{hour:02d}'",
+ 'historical_hour_max': "SELECT max({obs_type}) FROM {table} "
+ "WHERE STRFTIME('%m-%d-%H', datetime, 'unixepoch', 'localtime') "
+ "= '{month:02d}-{day:02d}-{hour:02d}'",
},
'mysql': {
'historical_min': "SELECT MIN(`min`) FROM {table}_day_{obs_type} "
***************
*** 81,106 ****
if aggregate_type not in XAggsHistorical.sql_stmts[dbtype]:
raise weewx.UnknownAggregation(aggregate_type)
# The time span must lie on midnight-to-midnight boundaries
! if db_manager.first_timestamp is None or db_manager.last_timestamp is None:
! raise weewx.UnknownAggregation(aggregate_type)
! if not (isStartOfDay(timespan.start) or timespan.start == db_manager.first_timestamp) \
! or not (isStartOfDay(timespan.stop) or timespan.stop == db_manager.last_timestamp):
! raise weewx.UnknownAggregation("%s of %s" % (aggregate_type, timespan))
!
! start_day = datetime.date.fromtimestamp(timespan.start)
! stop_day = datetime.date.fromtimestamp(timespan.stop)
!
! # The timespan must cover just one day
! delta = stop_day - start_day
! if delta.days != 1:
! raise weewx.UnknownAggregation("%s of %s" % (aggregate_type, timespan))
interp_dict = {
'table': db_manager.table_name,
'obs_type': obs_type,
'month': start_day.month,
! 'day': start_day.day
}
# Get the correct sql statement, and format it with the interpolation dictionary.
--- 87,113 ----
if aggregate_type not in XAggsHistorical.sql_stmts[dbtype]:
raise weewx.UnknownAggregation(aggregate_type)
+ start_day = datetime.datetime.fromtimestamp(timespan.start)
+ stop_day = datetime.datetime.fromtimestamp(timespan.stop)
+
# The time span must lie on midnight-to-midnight boundaries
! if aggregate_type not in ['historical_hour_min', 'historical_hour_max']:
! if db_manager.first_timestamp is None or db_manager.last_timestamp is None:
! raise weewx.UnknownAggregation(aggregate_type)
! if not (isStartOfDay(timespan.start) or timespan.start == db_manager.first_timestamp) \
! or not (isStartOfDay(timespan.stop) or timespan.stop == db_manager.last_timestamp):
! raise weewx.UnknownAggregation("%s of %s" % (aggregate_type, timespan))
! # The timespan must cover just one day
! delta = stop_day - start_day
! if delta.days != 1:
! raise weewx.UnknownAggregation("%s of %s" % (aggregate_type, timespan))
interp_dict = {
'table': db_manager.table_name,
'obs_type': obs_type,
'month': start_day.month,
! 'day': start_day.day,
! 'hour' : start_day.hour,
}
# Get the correct sql statement, and format it with the interpolation dictionary.
[[day_images]]
x_label_format = %H:%M
bottom_label_format = %A %d %B %Y %H h %M min
time_length = 97200 # 27 hours
[[[dayhistorical]]]
time_length = 86400
[[[[min]]]]
label = min
aggregate_type = historical_hour_min
aggregate_interval = hour
data_type = outTemp
[[[[outTemp]]]]
[[[[max]]]]
label = max
aggregate_type = historical_hour_max
aggregate_interval = hour
data_type = outTemp

To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b69d3c69-9144-4643-bda1-69b54df0c5cbn%40googlegroups.com.
