Move domain extractors and collect_snapshot into data_model.py
we_connect.py now only handles WeConnect login and vehicle selection. All extract_*() functions, ALL_DOMAINS, and collect_snapshot() live in data_model.py alongside the store and value helpers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-3
@@ -58,8 +58,7 @@ from pathlib import Path
|
||||
import log_config
|
||||
import network
|
||||
import we_connect
|
||||
from data_model import auto_out_path, load_store, save_store
|
||||
from we_connect import ALL_DOMAINS
|
||||
from data_model import ALL_DOMAINS, auto_out_path, collect_snapshot, load_store, save_store
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -118,7 +117,7 @@ def run(args: argparse.Namespace) -> None:
|
||||
|
||||
try:
|
||||
wc.update()
|
||||
snapshot = we_connect.collect_snapshot(vehicle, domains)
|
||||
snapshot = collect_snapshot(vehicle, domains)
|
||||
store["records"].append(snapshot)
|
||||
save_store(out, store, args.max_records)
|
||||
network.broadcast(snapshot, push_clients, push_lock)
|
||||
|
||||
Reference in New Issue
Block a user