Ah. Tom Keffer schrieb am Samstag, 24. Februar 2024 um 00:00:07 UTC+1:
You should not have to implement either. 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. - https://github.com/roe-dl/weewx-GTS/issues/26 - https://github.com/roe-dl/weewx-GTS/blob/master/bin/user/GTS.py 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. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e5010568-d6cd-4297-a608-89d1dee91bf0n%40googlegroups.com.