Conversation
…nd configurations
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
|
||
| er.async_remove(entity_entry.entity_id) | ||
| del self._tasks[task_id] | ||
| self._save() |
There was a problem hiding this comment.
Store delete doesn't remove entity from entities dict
Medium Severity
The delete method removes the task from self._tasks and the entity registry, but never removes it from hass.data[DOMAIN]["entities"]. The stale entity reference remains, causing the coordinator to keep polling it and potentially firing incorrect due events for a deleted task.
| await hass.http.async_register_static_paths( | ||
| [StaticPathConfig(PANEL_API_PATH, static_path, cache_headers=False)] | ||
| ) | ||
| hass.data["upkeep_static_path_registered"] = True |
There was a problem hiding this comment.
Panel static path setdefault always returns False initially
Low Severity
hass.data.setdefault("upkeep_static_path_registered", False) returns the existing value if the key exists, but on first call it sets and returns False. The not negation makes it work on the first call, but if a reload calls async_register_panel again after async_unload_entry pops only const.DOMAIN, the "upkeep_static_path_registered" key persists as True, so re-registration of the static path is skipped even though it may need re-registering.
| total_ms = (due - last).total_seconds() * 1000 | ||
| elapsed_ms = (now - last).total_seconds() * 1000 | ||
| progress = (elapsed_ms / total_ms * 100) if total_ms > 0 else 100 | ||
| progress = min(100, max(0, round(progress, 1))) |
There was a problem hiding this comment.
Progress clamped to max 100 hides overdue percentage
Low Severity
In _compute_progress_and_urgency, progress is clamped to min(100, ...), but the overdue check at line 108 uses progress >= 100. This means a task that is exactly at its due date (100%) is marked "overdue" rather than being considered still on time. Tasks due today are flagged overdue instead of due_soon.


Description
Converts the
home-maintenance-cardrepo from a frontend-only HACS Plugin into a full Home Assistant integration that replaces the unmaintained TJPoorman/home_maintenance integration.Integration (Python backend)
custom_components/upkeep/complete_task,snooze_task,enable_task,reset_last_performed,increment_counterupkeep/get_tasks,upkeep/add_task, etc.)upkeep_task_duefor task due notificationsRebrand: Home Maintenance → Upkeep
home_maintenance→upkeepcustom:home-maintenance-card→custom:upkeep-cardhome-maintenance-panel→upkeep-panelFrontend
panel-src/, built tocustom_components/upkeep/panel/dist/main.jsdist/upkeep-card.jsand copied tocustom_components/upkeep/www/Types & tests
UpkeepPanelexport inpanel-src/main.ts(TS6196)Event+as anywithCustomEvent<{ entityId: string }>intask-tile.ts_activeFilterasNonNullable<HomeMaintenanceCardConfig['filter']>and removedas anyinupkeep-card.tsType of change
Checklist
npm run lintpassesnpm run typecheckpassesnpm run testpassesnpm run format:checkpassesfeat:,fix:)Note
High Risk
High risk due to adding a full Home Assistant custom integration (storage, config flow, services, websocket commands, event firing, and entity lifecycle) and rebranding the distributed frontend artifact/IDs, which can affect existing installs and automations.
Overview
Rebrands the project from Home Maintenance Card to Upkeep and changes distribution from a frontend-only HACS plugin to a full custom integration (HACS Integration), updating release assets and build outputs to
dist/upkeep-card.jsandcustom_components/upkeep/www/upkeep-card.js.Adds a new
custom_components/upkeepbackend with config flow + options, persistent task storage, binary sensor entities for tasks (time- and frequency-based), task due polling/event emission (upkeep_task_due) with optional persistent notifications, NFC tag completion handling, and state watching to auto-increment frequency tasks.Introduces management APIs and UI: WebSocket CRUD/commands for tasks, HA services (
complete_task,snooze_task,enable_task,increment_counter,reset_last_performedalias), and a bundled sidebar panel (panel/dist/main.js) for creating and managing tasks.Written by Cursor Bugbot for commit 4b3a9fd. This will update automatically on new commits. Configure here.