Skip to content

Rename "Todo list offset" to "Due soon" and add due_soon sensor state#22

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/rename-todo-list-offset-to-due-soon
Draft

Rename "Todo list offset" to "Due soon" and add due_soon sensor state#22
Copilot wants to merge 2 commits intomainfrom
copilot/rename-todo-list-offset-to-due-soon

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

The todo_offset_days config option is renamed to due_soon_days, and a new due_soon sensor state is introduced: a task enters this state when 0 < due_in <= due_soon_days (i.e. it is approaching its due date within the configured threshold). Todo list sync behavior is unchanged — the same threshold continues to drive when tasks appear in todo lists.

Config & Options

  • CONF_TODO_OFFSET_DAYSCONF_DUE_SOON_DAYS ("due_soon_days")
  • CONF_TODO_OFFSET_OVERRIDECONF_DUE_SOON_OVERRIDE ("due_soon_override")
  • Options form label updated to "Due soon (days)"

State Logic (sensor.py)

New state priority (highest → lowest): inactive > due > due_soon > done

if not effective_active:
    self._attr_native_value = CONST_INACTIVE
elif self.due_in == 0:
    self._attr_native_value = CONST_DUE
elif self.due_in <= effective_due_soon_days:
    self._attr_native_value = CONST_DUE_SOON
# else: CONST_DONE

Migration

  • Version bumped 1.2 → 1.3
  • New migration step renames todo_offset_days/todo_offset_override keys in stored entry options
  • Entries at 1.1 chain through both 1.1→1.2 and 1.2→1.3 in a single async_migrate_entry call

Frontend

  • Card and panel: due_soon renders in orange (#e67e22), between red (due) and green (done)
  • Panel filter buttons include due_soon count alongside existing states

Translations

  • EN/DE strings updated with due_soon state labels and renamed option descriptions

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…o v1.3

Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Copilot AI changed the title [WIP] Update todo list offset to due soon with new state logic Rename "Todo list offset" to "Due soon" and add due_soon sensor state Mar 17, 2026
Copilot AI requested a review from gensyn March 17, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants