Ah.
For WeeWX 5.0 people experienced that the "GTS", "yearGDD", and "seasonGDD" observation types (XTypes calculated out of "outTemp") were not graphed any more. After an explicit implementation of "not_null" the graph appeared again.
tags.ObservationBinder.has_data has changed from WeeWX 4.X to 5.0. The old version only looked into the database by calling self.db_lookup(self.data_binding).has_data(self.obs_type, self.timespan). The new version is:
@property
def has_data(self):
db_manager = self.db_lookup(self.data_binding)
# First see if the type exists in the database.
if db_manager.exists(self.obs_type):
# Yes. Is it non-null?
val = bool(weewx.xtypes.get_aggregate(self.obs_type, self.timespan,
'not_null', db_manager)[0])
else:
# Nope. Try the xtypes system.
val = weewx.xtypes.has_data(self.obs_type, self.timespan, db_manager)
return val
If you look into weewx.xtypes.get_aggregate(...,'not_null',...) and weewx.xtypes.has_data() they do almost the same. There is a loop over xtypes, and for each xtype get_aggreate() is called. If I understand the code right, the result of the has_data property in WeeWX 5.0 is independent of the value of the condition of the if statement. And the database lookup, that is used in WeeWX 4.X, has gone at all.