Skip to content

feat: [v2] Rename product to upkeep, integrate task management.#1

Merged
etorhub merged 2 commits intomainfrom
v2
Mar 13, 2026
Merged

feat: [v2] Rename product to upkeep, integrate task management.#1
etorhub merged 2 commits intomainfrom
v2

Conversation

@etorhub
Copy link
Owner

@etorhub etorhub commented Mar 11, 2026

Description

Converts the home-maintenance-card repo from a frontend-only HACS Plugin into a full Home Assistant integration that replaces the unmaintained TJPoorman/home_maintenance integration.

Integration (Python backend)

  • Core: manifest, const, store, config_flow, binary_sensor, coordinator in custom_components/upkeep/
  • Services: complete_task, snooze_task, enable_task, reset_last_performed, increment_counter
  • WebSocket API: CRUD for tasks (upkeep/get_tasks, upkeep/add_task, etc.)
  • Events: upkeep_task_due for task due notifications
  • Features: time-based and frequency-based tasks, entity watching, NFC tag handling, snooze auto-re-enable

Rebrand: Home Maintenance → Upkeep

  • Integration domain: home_maintenanceupkeep
  • Card type: custom:home-maintenance-cardcustom:upkeep-card
  • Panel: home-maintenance-panelupkeep-panel
  • Classes, WebSocket commands, and events renamed accordingly

Frontend

  • Lit-based sidebar panel in panel-src/, built to custom_components/upkeep/panel/dist/main.js
  • Lovelace card built to dist/upkeep-card.js and copied to custom_components/upkeep/www/
  • Card and panel updated for frequency tasks, snooze, and assigned user

Types & tests

  • Fixed UpkeepPanel export in panel-src/main.ts (TS6196)
  • Replaced Event + as any with CustomEvent<{ entityId: string }> in task-tile.ts
  • Typed _activeFilter as NonNullable<HomeMaintenanceCardConfig['filter']> and removed as any in upkeep-card.ts

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Other (please describe):

Checklist

  • npm run lint passes
  • npm run typecheck passes
  • npm run test passes
  • npm run format:check passes
  • Commits follow Conventional Commits (e.g. feat:, 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.js and custom_components/upkeep/www/upkeep-card.js.

Adds a new custom_components/upkeep backend 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_performed alias), 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.

@etorhub etorhub changed the title feat: rename Home Maintenance Card to Upkeep, update related files an… feat: [v2] Rename product to upkeep, integrate task management. Mar 11, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

await hass.http.async_register_static_paths(
[StaticPathConfig(PANEL_API_PATH, static_path, cache_headers=False)]
)
hass.data["upkeep_static_path_registered"] = True
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

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)))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

@etorhub etorhub merged commit 2cdcb07 into main Mar 13, 2026
7 checks passed
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.

1 participant