For Integrators & Developers
This page is for those who want to connect a battery brand that is not Marstek, build a custom bridge, or otherwise integrate their own hardware with Home Battery Control (HBC).
HBC is brand-agnostic at its core: the strategy flows and dashboards don’t talk to your battery directly — they read from and write to a fixed set of Home Assistant entities. As long as your setup exposes those entities with the expected names and behaviour, HBC works out of the box.
The reference naming follows the
Fonskeprojects for the Marstek Venus (them1device). To integrate another brand, map your hardware’s values onto these same entity names — see the Anker SOLIX example for a worked template.
Entities HBC expects from a battery
The table below lists every entity HBC reads or writes for a single battery (m1). For additional batteries the prefix increments (m2, m3, …).
Sensors (read by HBC)
| Entity | Purpose | Notes |
|---|---|---|
sensor.marstek_m1_device_name |
Friendly device name | Used for labelling/identification |
sensor.marstek_m1_battery_state_of_charge |
Battery SoC (%) | Core control input |
sensor.marstek_m1_battery_voltage |
Battery voltage (V) | Can be a fixed 0 if unavailable |
sensor.marstek_m1_battery_total_energy |
Total battery capacity (energy) | |
sensor.marstek_m1_ac_power |
AC power | |
sensor.marstek_m1_battery_power |
Battery (DC) power | |
sensor.marstek_m1_inverter_state_number |
Inverter state as a number | Used indirectly by HBC via the derived state |
sensor.marstek_m1_inverter_state |
Inverter state (text) | Derived from the state number |
sensor.marstek_m1_battery_remaining_capacity |
Remaining usable capacity |
Numbers (read & written by HBC)
| Entity | Purpose | Notes |
|---|---|---|
number.marstek_m1_max_charge_power |
Max charge power setpoint | |
number.marstek_m1_max_discharge_power |
Max discharge power setpoint | |
number.marstek_m1_forcible_charge_power |
Forced charge power | |
number.marstek_m1_forcible_discharge_power |
Forced discharge power | |
number.marstek_m1_charge_to_soc |
Target SoC for charging | Not used by HBC |
Selects (read & written by HBC)
| Entity | Purpose | Notes |
|---|---|---|
select.marstek_m1_rs485_control_mode |
RS485 control mode | States: enable / disable. Must be enable for Marstek |
select.marstek_m1_user_work_mode |
Battery work mode | Must be manual for Marstek batteries |
select.marstek_m1_forcible_charge_discharge |
Forced charge/discharge selector | |
select.marstek_m1_backup_function |
Backup function | Not used by HBC |
Mapping another brand
If your battery is exposed under different entity names, you have two options:
- Create Home Assistant helper/template entities (recommended) that map your hardware’s values onto the expected entity names above. This keeps the HBC flows untouched, so updating HBC later stays simple. See the Anker to M1 Marstek package by Jos for a complete, working template.
- Alter the mapping inside the Node-RED flows. Possible, but less advised — it makes updating HBC later cumbersome.
For the bigger picture of how data flows from your meter and battery through Home Assistant into the HBC strategy flows and dashboard, see the connection schema overview.
Contributing
Adding support for a new brand? Share it with the community:
- Discord — join the community and find the channel for your brand
- GitHub — open or follow an issue, e.g. the Anker SOLIX tracking issue