Skip to content

Sequence next_schedule stays null when today matches a schedule weekday but the time has already passed #246

Description

@anthonysaliba

Describe the bug
When a sequence's schedule includes today's weekday, but today's scheduled
time has already passed, the sequence entity's next_schedule attribute
stays null instead of calculating the next valid occurrence (e.g. next
week). This happens even though schedule_count correctly shows 1, and
the sequence is fully functional via manual_run.

Once the date rolls past today, next_schedule calculates correctly again
for future weekday matches. The bug only affects the display/attribute
calculation for the "already passed today" case — it does not appear to
affect the actual underlying trigger, though I have not yet confirmed the
scheduled run fires correctly at the next occurrence.

Configuration

irrigation_unlimited:
  controllers:
    - name: "Well Irrigation System"
      entity_id: switch.pump_master_override
      preamble: "00:00:05"
      postamble: "00:00:10"
      zones:
        - name: "Zone 2 - Vines and Stone Fruit"
          zone_id: zone2
          enabled: true
          entity_id: switch.swv_zone_2
          allow_manual: true
          show:
            timeline: true
      sequences:
        - name: "Zone 2 - Vines and Stone Fruit"
          schedules:
            - name: "Tue/Fri morning"
              time: "06:00"
              weekday:
                - tue
                - fri
          zones:
            - zone_id: zone2
              duration: "01:00:00"

To Reproduce

  1. Configure a sequence with a weekday schedule that includes today's day
    of week, with a time earlier than the current time.
  2. Reload / restart Home Assistant.
  3. Check binary_sensor.irrigation_unlimited_c1_s2 (or the relevant
    sequence entity) attributes.
  4. Observe next_schedule: null, next_start absent, and the zone's
    start/duration under the sequence show null / 0:00:00.

Expected behavior
next_schedule should calculate forward to the next matching weekday
(e.g. skip to next Tuesday), the same way it correctly does when today
is NOT one of the scheduled weekdays.

Workaround found
Temporarily changing the schedule's weekday list to a day later in the
current week (e.g. sat) causes next_schedule to populate correctly.
Reverting to the original weekday list (which includes today) causes it
to go back to null until the date rolls over past today.

Companion card behavior
The irrigation-unlimited-card also shows this correctly as a blank time
for the affected sequence/zone row while other zones display normally.

Versions
Installation method Home Assistant OS
Core 2026.4.4
Supervisor 2026.06.2
Operating System 17.2
Frontend 20260325.8

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Version Version 149.0.7827.200 (Official Build) (64-bit)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions