A Home Assistant Custom Card for the Marstek B2500d storage system.
Since you can also define individual entities and options, this card is suitable for other storage systems as well!
Large Card:
Compact Card:
Inspired by the Marstek app, this custom card displays the values of your B2500d storage system โ or, optionally, if the corresponding entities are available, any other storage system.
The card displays the current charging/discharging status at the top.
The status also shows the current battery level in %.
The following values/cards can currently be displayed:
- Current solar power total and input 1 & input 2
- Current total output power
- Battery level / capacity
- Daily power generation
You can also configure the following modes:
- Charging mode (simultaneous charge/discharge vs. full charge before discharge)
- Discharge mode (auto/manual)
- Surplus feed-in (on/off)
Each of these cards can optionally be hidden (see section Parameters).
Note: The settings card is hidden by default when using entities mode.
This card cannot be customized.
Optionally, the b2500d-card works best with a device provided by this add-on:
This way, you can easily pass the whole device, as the card uses the standard entities.
For this, use the device parameter.
If entities have been renamed, this method wonโt work. You can still pass individual entities manually (see Parameters section).
The card is available in HACS (Home Assistant Community Store).
- Open HACS
- Frontend โ top right menu โ Custom Repositories โ
Neisi/b2500d-card - Select type: Dashboard
- Install
- Copy
b2500d-card.jsto/config/www/ - Add it in Lovelace:
resources:
- url: /local/b2500d-card.js
type: moduleHere are the available parameters for this Lovelace card.
You must provide exactly one of the following parameters:
| Name | Type | Description |
|---|---|---|
device |
string | The name of your device. Example: if the sensor for battery percentage is sensor.speicher_1_links_battery_percentage, then <speicher_1_links> is the device name. |
entities |
object | A collection of individual entities if you donโt want to provide a full device. In this mode, the settings card is hidden automatically by default. |
If you provide individual entities instead of device, the object looks like this:
| Key | Type | Description |
|---|---|---|
battery_percentage |
string | Battery charge sensor (%) |
battery_capacity |
string | Available battery capacity (Wh or kWh) |
solar_power |
string | Total solar power sensor |
p1_power |
string | PV string 1 sensor |
p2_power |
string | PV string 2 sensor |
output_power |
string | Total output power sensor |
production_today |
string | Daily PV generation sensor (Wh or kWh) |
โน๏ธ Note:
The card automatically detects the unit of measurement (Wh or kWh) for battery_capacity and production_today and converts values to kWh internally.
You donโt have to provide all entities. Missing entities are automatically set to 0.
For the compact card, itโs enough to provide e.g. battery_percentage, solar_power, and output_power.
| Name | Type | Description | Default |
|---|---|---|---|
name |
string | Display name of your storage system (shown top left) | Device name (e.g. speicher_1_links) |
output |
boolean | Show output power card | true |
battery |
boolean | Show battery card | true |
production |
boolean | Show production card | true |
settings |
boolean | Show settings card | true |
solar |
boolean | Show solar card | true |
icon |
boolean | Show storage icon | true |
compact |
boolean | Show compact version | false |
max_input_power |
number | Maximum input power for scaling P1 bar | 600 |
max_input_power2 |
number | Maximum input power for scaling P2 bar | 600 |
max_input_power3 |
number | Maximum input power for scaling P3 bar | 600 |
max_input_power4 |
number | Maximum input power for scaling P4 bar | 600 |
p3_power |
string | PV string 3 sensor | null |
p4_power |
string | PV string 4 sensor | null |
last_update |
string | ISO 8601 string for last update | n/a |
If you want to add your own switches or select entities to the settings card, even in entities mode, you can use the optional custom_settings parameter.
Each item in the array can define:
| Key | Type | Description |
|---|---|---|
entity |
string | The entity ID of the switch or select you want to show. |
name |
string | Optional: Display name for the entity. |
icon |
string | Optional: Icon to display (mdi: format). |
โน๏ธ Note:
settings paramter will be ignored or automatically set to true.
The card can be configured either with the code editor or (since v1.4.0) with the visual editor.
Add the complete card to your dashboard:
type: custom:b2500d-card
device: speicher_2_rechts
name: Storage 2 rightHide settings:
type: custom:b2500d-card
device: speicher_2_rechts
name: Storage 2 right
settings: falseShow only solar power:
type: custom:b2500d-card
device: speicher_2_rechts
name: Storage 2 right
settings: false
output: false
production: false
battery: falseShow only status card:
type: custom:b2500d-card
device: speicher_2_rechts
name: Storage 2 right
settings: false
output: false
production: false
battery: false
solar: falseShow compact card:
type: custom:b2500d-card
device: speicher_1_links
name: Storage 1 left
compact: trueExample using entities instead of device:
type: custom:b2500d-card
name: My Storage
entities:
solar_power: sensor.my_storage_total_input_power
battery_capacity: sensor.my_storage_battery_capacity
...with custom settings:
type: custom:b2500d-card
settings: true
name: My Storage
entities:
battery_percentage: sensor.my_battery_percentage
battery_capacity: sensor.my_battery_capacity
solar_power: sensor.my_solar_power
output_power: sensor.my_output_power
....
custom_settings:
- entity: switch.my_storage_surplus_feed_in
name: "Surplus Feed-in"
icon: mdi:transmission-tower-import
- entity: select.my_charging_mode
name: "Charging Mode"The configuration can also be done using the built-in form editor (visual editor).










