I’d prefer not to spend a lot of time on the forecast module.  I got stuck with it because I ported it to WeeWX 4 and others asked me to share.  I don’t actually use the forecast module myself.  I haven’t complained before about keeping forecast running, but having to deal with users installing an extension, being pushed on this list, that returns None for the next rise/set certainly has me annoyed.

On Jan 19, 2026, at 9:54 PM, Karen K <[email protected]> wrote:

John Kline schrieb am Dienstag, 20. Januar 2026 um 02:48:24 UTC+1:
I will put out a forecast that guards against None for sun/moon rise/set.

I guess moonrise and moonset will be enough, as the Sun rises and sets every day (except polar regions) but the Moon does not. 

Having said that, do we want None to be returned if the moonset is after midnight?

As an alternative you could take the timestamp of moonrise and calculate the next setting then like $almanac(almanac_time=$almanac.moon.rise).moon.next_setting. Then you catch moonset after midnight. But what I got from a short glimpse into the code of forecast_table.inc the events are filtered there if they are within the respective forecast period. A moonset after midnight would be filtered there anyway, if I got that right.

--
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/ef25c075-2a03-417f-9a4d-50d90ea55bacn%40googlegroups.com.

--
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/F4463BB2-0036-453C-BBAF-7BFF7F3BC9DB%40johnkline.com.

Reply via email to