The SyncCommand currently handles both CLI concerns (parsing options, formatting output) and domain logic (fetching data, matching rooms to sensors, applying corrections).
Extract the sync logic into a TrueTempSyncService so that:
SyncCommand is a thin shell that parses options and displays results
TrueTempSyncService owns the sync workflow (fetch homes, match sensors, apply corrections)
- The service can be reused/tested independently of the CLI layer
The
SyncCommandcurrently handles both CLI concerns (parsing options, formatting output) and domain logic (fetching data, matching rooms to sensors, applying corrections).Extract the sync logic into a
TrueTempSyncServiceso that:SyncCommandis a thin shell that parses options and displays resultsTrueTempSyncServiceowns the sync workflow (fetch homes, match sensors, apply corrections)