diff --git a/.gitignore b/.gitignore index 1f438e1..7557440 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,6 @@ data/processed/* !data/raw/solar_hourly.csv !data/raw/thuisbatterijgids_catalog.csv !data/raw/thuisbatterijgids_catalog.json +!data/raw/extra_batteries.json .DS_Store diff --git a/data/raw/extra_batteries.json b/data/raw/extra_batteries.json new file mode 100644 index 0000000..b16db05 --- /dev/null +++ b/data/raw/extra_batteries.json @@ -0,0 +1,17 @@ +[ + { + "id": -1, + "title": "Tesla Powerwall 3 (installed)", + "url": "https://www.tesla.com/powerwall", + "brand": "Tesla", + "brand_slug": "tesla", + "capacity": 13.5, + "power_continuous": 11500, + "price": 9500, + "price_per_kwh": 704, + "review_score": null, + "recommended": false, + "installation": "hybrid", + "image_url": "" + } +] diff --git a/src/pluginbattery/web.py b/src/pluginbattery/web.py index 2bbcd30..0f5c928 100644 --- a/src/pluginbattery/web.py +++ b/src/pluginbattery/web.py @@ -49,28 +49,13 @@ _AVG_CONSUMER_BASE = float(_BASE_DF["eur_per_kwh"].mean()) with open(DATA_DIR / "thuisbatterijgids_catalog.json") as _f: _CATALOG = json.load(_f) -# Hybrid / DC-coupled units — not on thuisbatterijgids.net (they only list -# plug-in), but useful as a reference point. Prices are NL street price incl. -# a typical install (since these can't be self-installed). Mark with -# installation == "hybrid" so the LP runs with allows_export=True. -HYBRID_EXTRAS = [ - { - "id": -1, - "title": "Tesla Powerwall 3 (installed)", - "url": "https://www.tesla.com/powerwall", - "brand": "Tesla", - "brand_slug": "tesla", - "capacity": 13.5, - "power_continuous": 11500, - "price": 9500, - "price_per_kwh": 704, - "review_score": None, - "recommended": False, - "installation": "hybrid", - "image_url": "", - }, -] -_CATALOG = _CATALOG + HYBRID_EXTRAS +# Edit data/raw/extra_batteries.json to add anything not on thuisbatterijgids.net +# (hybrids, PV-DC-coupled units, alternative SKUs). Same schema as the scraped +# catalog; set "installation" to "hybrid" for batteries that can export to grid. +_EXTRAS_PATH = DATA_DIR / "extra_batteries.json" +if _EXTRAS_PATH.exists(): + with open(_EXTRAS_PATH) as _f: + _CATALOG = _CATALOG + json.load(_f) def _category(power_kw: float, allows_export: bool) -> str: