Files
haos-hacs-immich-album-watcher/plans
alexei.dolgolyov b107cfe67f
Some checks failed
Validate / Hassfest (push) Has been cancelled
Refactor HAOS integration to use shared core library (Phase 2)
Wire the integration to delegate all HA-independent logic to
immich-watcher-core, eliminating ~2300 lines of duplicated code.

Changes:
- const.py: Import shared constants from core, keep HA-specific ones
- storage.py: Create HAStorageBackend adapter wrapping HA's Store,
  use core TelegramFileCache and NotificationQueue via adapter
- coordinator.py: Delegate to core ImmichClient for API calls,
  detect_album_changes() for change detection, and asset_utils
  for filtering/sorting/URL building. Keep HA-specific event firing.
- sensor.py: Replace ~1300 lines of Telegram code with 15-line
  delegation to core TelegramClient. Keep entity classes unchanged.
- __init__.py: Use factory functions for creating core instances
  with HA storage backends
- manifest.json: Add immich-watcher-core dependency

Integration line count: 3600 -> 1295 lines (-64%)
Zero behavior changes for end users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:47:18 +03:00
..

Plans

This folder contains the primary architecture plan and phase-specific subplans for the Immich Watcher project restructuring.

Structure

  • primary-plan.md -- Master plan with architecture decisions and phase overview
  • phase-1-core-library.md -- Extract shared core library
  • phase-2-haos-refactor.md -- Wire core into HAOS integration
  • phase-3-server-backend.md -- Build standalone FastAPI server
  • phase-4-frontend.md -- Build SvelteKit web UI
  • phase-5-haos-server-sync.md -- Optional HAOS-Server integration

Tracking

Each plan uses checkbox tracking:

  • [ ] -- Not started
  • [x] -- Completed
  • [~] -- In progress
  • [-] -- Skipped/deferred

Phase subplans are created when work on that phase begins (not all upfront).