# Predbat custom-inverter config for the EP Cube # Drop into Predbat's apps.yaml under `pred_bat:` (replace the inverter block). # # Usage: # 1. Set predbat_inverter_type to a unique name; "EP_CUBE" is fine. # 2. After saving, restart the Predbat add-on and watch its logs to verify # it sees the entities and successfully calls our shim services. # # Entity IDs are stable across devIds — the integration uses a fixed # `EP Cube` device name, so the slug is just `sensor.ep_cube_` with # no per-account substitution needed. # # References: # - https://springfall2008.github.io/batpred/inverter-setup/ # - https://springfall2008.github.io/batpred/apps-yaml/ pred_bat: # ─── Inverter identification ────────────────────────────────────────────── inverter_type: 'EP_CUBE' num_inverters: 1 ge_inverter: 0 # not GivEnergy # ─── Sensor entities (read) ─────────────────────────────────────────────── soc_kw: - sensor.ep_cube_battery_energy soc_max: - sensor.ep_cube_battery_capacity soc_percent: - sensor.ep_cube_battery_soc battery_power: - sensor.ep_cube_battery_power pv_power: - sensor.ep_cube_solar_power load_power: - sensor.ep_cube_load_power grid_power: - sensor.ep_cube_grid_power reserve: - sensor.ep_cube_reserve_soc # ─── Battery physical specs ─────────────────────────────────────────────── # Adjust to match your hardware. battery_rate_max_charge: 5.0 # kW battery_rate_max_discharge: 5.0 # kW battery_loss: 0.03 # 3% conversion loss (typical Li-ion + inverter) battery_loss_discharge: 0.03 inverter_loss: 0.03 # ─── Control surface (write) ────────────────────────────────────────────── # Predbat calls these services. Our shim translates rate+window → TOU rewrite. inverter_can_charge_during_export: True inverter_can_force_export: True # Each *_service is a dict (Predbat schema) — service: .. # Our shim takes targets via service_data, not entity_id, so no entity_id here. # Charge controls charge_start_service: service: ep_cube.charge_start charge_stop_service: service: ep_cube.charge_stop charge_freeze_service: service: ep_cube.charge_freeze # Discharge controls discharge_start_service: service: ep_cube.discharge_start discharge_stop_service: service: ep_cube.discharge_stop discharge_freeze_service: service: ep_cube.discharge_freeze # Idle / restore baseline idle_service: service: ep_cube.idle # If you have multiple EP Cubes, uncomment and set the device_id explicitly: # service_data: # device_id: # the small-int devId from the HA integration config # ─── Tariff (auto-detected from BottlecapDave's Octopus HACS integration) ─ # https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy # Regex auto-matches whatever MPAN/serial the integration exposes, and # whatever tariff is currently active on the account (Flexible / Agile / # Cosy / etc.) — no apps.yaml change needed when switching tariffs. metric_octopus_import: 're:(event.octopus_energy_electricity_[0-9a-z_]+(?__previous_consumption' # For dev, Predbat will use historical HA data from `load_power` sensor. # ─── ML load prediction (https://springfall2008.github.io/batpred/load-ml/) # Neural-net 48-hour load forecast trained on your load history + PV # generation + outdoor temperature. Recommended. # # Shadow mode first — `load_ml_enable: true` starts training and publishes # `sensor.predbat_load_ml_forecast` but does NOT yet affect planning. # After 24-48h, compare the forecast to actuals. If sane, uncomment # `load_ml_source: true` so Predbat uses the ML predictions in the # optimiser. Needs 1+ day of history (7+ recommended). load_ml_enable: true # load_ml_source: true # enable after shadow-mode verification temperature_enable: true # outdoor temp from zone.home — recommended ML input # ─── Predbat behaviour ─────────────────────────────────────────────────── forecast_hours: 48 best_soc_min: 0.5 # kWh — never plan below this best_soc_keep: 1.0 # kWh — soft reserve target combine_charge_slots: True combine_discharge_slots: True