Where do you live? At this time of year here in mid Finland nights are so short the sun won’t go “low enough” for the astro binding. I noticed same behavior few days ago when my rule threw errors.
So there is no astronomical night and that’s what UnDeff means. I suggest to handle those UnDeff values in your rule to skip part of it and set your “TimeOfDay” item to what ever suits best. For example a new state “MidsummeNight” if your night lightning depends on it.
Here’s a link to astro bindings doc mentioning UnDef: