SchedMD sometimes adds not states for jobs that easily can be missed.
One way of changing this would be to fetch all jobs in the datetime range and filter out jobs based on the state and unknown states could raise an error to catch the unknown state.