How qu4nd/ha-todo-sync works
To-do Sync is a local Home Assistant integration that mirrors open items between two selected to-do entities. Users configure a list pair and options; the integration starts a coordinator that reacts to list changes, periodic ticks, or a manual button, reads and normalizes both lists, applies synchronization rules, and persists a three-way snapshot. Status is exposed through a diagnostic sensor. The README documents duplicate cleanup and empty-list protection; their detailed internals are not fully shown in the excerpts, so they are represented as coordinator responsibilities.
Main entry points: syncer.py Sync coordinator · __init__.py Entry lifecycle · config_flow.py Pair options · storage.py Snapshot storage
Components 14
Configuration
- Pair options
custom_components/todo_sync/config_flow.py
Sync runtime
- Entry lifecycle
custom_components/todo_sync/__init__.py - Sync coordinator
custom_components/todo_sync/syncer.py - List read and write
custom_components/todo_sync/syncer.py - Reconcile and deduplicate
custom_components/todo_sync/syncer.py - Retry and empty guard
custom_components/todo_sync/policy.py
Models and state
- Item identity
custom_components/todo_sync/models.py - Snapshot storage
custom_components/todo_sync/storage.py - Sync status
custom_components/todo_sync/status.py
Home Assistant
- Sync button
custom_components/todo_sync/button.py - Status sensor
custom_components/todo_sync/sensor.py
Other components
- User
- Home Assistant
- To-do entities
Connections 16
- User → Pair options: selects pair
README.md - Pair options → Entry lifecycle: creates entry
README.md - Home Assistant → Entry lifecycle: loads entry
custom_components/todo_sync/__init__.py - Entry lifecycle → Sync coordinator: starts
custom_components/todo_sync/__init__.py - Entry lifecycle → Sync button: forwards setup
custom_components/todo_sync/__init__.py - Entry lifecycle → Status sensor: forwards setup
custom_components/todo_sync/__init__.py - Sync button → Sync coordinator: requests sync
custom_components/todo_sync/button.py - Sync coordinator → To-do entities: reads and updates
README.md - Sync coordinator → Reconcile and deduplicate: reconciles changes
custom_components/todo_sync/syncer.py - Sync coordinator → Retry and empty guard: checks policy
custom_components/todo_sync/syncer.py - Sync coordinator → Item identity: normalizes identity
custom_components/todo_sync/syncer.py - Sync coordinator → Snapshot storage: loads and saves
custom_components/todo_sync/syncer.py - Sync coordinator → Sync status: updates status
custom_components/todo_sync/syncer.py - Snapshot storage → Home Assistant: uses local store
custom_components/todo_sync/storage.py - Status sensor → Sync coordinator: reads status
custom_components/todo_sync/sensor.py - Home Assistant → Sync coordinator: dispatches list events
custom_components/todo_sync/syncer.py