Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ RELEASE_NOTES_TEMP.txt
# Ignore notes and development files
notes/
template_sensor_bob_battery_dashboard.yaml
.DS_Store

# Ignore opencode local workspace
.opencode/

# Ignore SASS cache files
docs/.sass-cache

# Node.js dependencies and test output
node_modules/

coverage/

# Claude Code per-user state — keep local; commands/skills/agents/settings.json are shared
.claude/settings.local.json
.claude/sessions/
.claude/sessions/
7 changes: 7 additions & 0 deletions docs/06-advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ nav_order: 6
## Multi-Battery Management
- **More than 6 batteries:** Override or change `input_number.house_battery_count` and you are good to go.
- The dashboard supports 6 batteries out of the box. For 7 or more, duplicate and edit these cards or create your own dashboard.
- **Manual phase assignment:** Assign each configured battery to `L1`, `L2`, `L3`, or `Unassigned` from the dashboard.
- The overview shows the assigned phase on each battery header and shows live battery AC power per phase in kW.
- The Node-RED battery object exposes this as `battery.phase`, so custom strategies can use the mapping.
- Optional per-phase grid power aliases can be configured in `packages/house_battery_control_config.yaml` as `sensor.p1_meter_l1_power`, `sensor.p1_meter_l2_power`, and `sensor.p1_meter_l3_power`. Leave them commented out if your setup is not three-phase.
- Node-RED exposes configured phase meter values as `msg.grid_power_phase.L1`, `.L2`, and `.L3`, with missing or unreadable values set to `null`.
- Built-in strategies still use aggregate control by default; per-phase control/peak shaving is not enforced yet.
- **3-Phase self-consumption:** if you require 0 W grid consumption on a per phase basis, the setup changes slightly.

Note: most homes get billed for the net total of all phases. If that is the case for you as well, ignore these instructions.
Expand Down Expand Up @@ -94,6 +100,7 @@ Controls grid import/export thresholds for `peak shaving` functionality.

- **Import limit:** Maximum power to draw from the grid (example: 16A × 230V = 3680W for CAPTAR contracts)
- **Export limit:** Maximum power to feed back to the grid (example: 3000W if grid connection has export limits)
- **Max phase power:** Shared per-phase safety threshold for future/custom phase-aware strategies. This value is exposed to Node-RED as `msg.grid_power_limit_phase`, but built-in strategies do not enforce it yet.
- **Configuration:** Adjust from the "Settings" tab in the Home Assistant dashboard

### Charge / Sell Power Mode
Expand Down
Binary file removed home assistant/.DS_Store
Binary file not shown.
107 changes: 85 additions & 22 deletions home assistant/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,30 @@ views:
columns: full
rows: 1
- type: heading
heading: Marstek M1
heading: Battery Phase Interaction
heading_style: subtitle
icon: ''
icon: mdi:transmission-tower
visibility:
- condition: state
entity: binary_sensor.house_battery_has_phase_assignment
state: 'on'
- type: glance
entities:
- entity: sensor.house_battery_l1_power
name: L1
- entity: sensor.house_battery_l2_power
name: L2
- entity: sensor.house_battery_l3_power
name: L3
columns: 3
visibility:
- condition: state
entity: binary_sensor.house_battery_has_phase_assignment
state: 'on'
- type: markdown
content: >-
### Marstek M1{% set phase = states('input_select.marstek_m1_phase') %}{% if phase == 'L1' %} - Phase 1{% elif phase == 'L2' %} - Phase 2{% elif phase == 'L3' %} - Phase 3{% endif %}
text_only: true
visibility:
- condition: state
entity: sensor.marstek_m1_device_name
Expand All @@ -431,10 +452,10 @@ views:
- condition: state
entity: sensor.marstek_m1_device_name
state_not: unknown
- type: heading
heading: Marstek M2
heading_style: subtitle
icon: ''
- type: markdown
content: >-
### Marstek M2{% set phase = states('input_select.marstek_m2_phase') %}{% if phase == 'L1' %} - Phase 1{% elif phase == 'L2' %} - Phase 2{% elif phase == 'L3' %} - Phase 3{% endif %}
text_only: true
visibility:
- condition: and
conditions:
Expand Down Expand Up @@ -463,10 +484,10 @@ views:
- condition: numeric_state
entity: input_number.house_battery_count
above: 1
- type: heading
heading: Marstek M3
heading_style: subtitle
icon: ''
- type: markdown
content: >-
### Marstek M3{% set phase = states('input_select.marstek_m3_phase') %}{% if phase == 'L1' %} - Phase 1{% elif phase == 'L2' %} - Phase 2{% elif phase == 'L3' %} - Phase 3{% endif %}
text_only: true
visibility:
- condition: and
conditions:
Expand Down Expand Up @@ -495,10 +516,10 @@ views:
- condition: numeric_state
entity: input_number.house_battery_count
above: 2
- type: heading
heading: Marstek M4
heading_style: subtitle
icon: ''
- type: markdown
content: >-
### Marstek M4{% set phase = states('input_select.marstek_m4_phase') %}{% if phase == 'L1' %} - Phase 1{% elif phase == 'L2' %} - Phase 2{% elif phase == 'L3' %} - Phase 3{% endif %}
text_only: true
visibility:
- condition: and
conditions:
Expand Down Expand Up @@ -527,10 +548,10 @@ views:
- condition: numeric_state
entity: input_number.house_battery_count
above: 3
- type: heading
heading: Marstek M5
heading_style: subtitle
icon: ''
- type: markdown
content: >-
### Marstek M5{% set phase = states('input_select.marstek_m5_phase') %}{% if phase == 'L1' %} - Phase 1{% elif phase == 'L2' %} - Phase 2{% elif phase == 'L3' %} - Phase 3{% endif %}
text_only: true
visibility:
- condition: and
conditions:
Expand Down Expand Up @@ -559,10 +580,10 @@ views:
- condition: numeric_state
entity: input_number.house_battery_count
above: 4
- type: heading
heading: Marstek M6
heading_style: subtitle
icon: ''
- type: markdown
content: >-
### Marstek M6{% set phase = states('input_select.marstek_m6_phase') %}{% if phase == 'L1' %} - Phase 1{% elif phase == 'L2' %} - Phase 2{% elif phase == 'L3' %} - Phase 3{% endif %}
text_only: true
visibility:
- condition: and
conditions:
Expand Down Expand Up @@ -1848,6 +1869,24 @@ views:
text_only: true
grid_options:
columns: full
- type: grid
cards:
- type: heading
icon: mdi:fuse
heading: Per-phase safety limit
heading_style: subtitle
- type: entities
entities:
- entity: input_number.house_battery_control_max_phase_power
name: Max phase power
- type: markdown
content: >-
<font color=grey><i>Available for custom and future phase-aware
strategies. Built-in strategies do not enforce this limit
yet.</i></font>
text_only: true
grid_options:
columns: full
- type: grid
cards:
- type: heading
Expand Down Expand Up @@ -1890,6 +1929,10 @@ views:
icon: mdi:power-plug-battery
heading: Marstek M1
heading_style: title
- type: entities
entities:
- entity: input_select.marstek_m1_phase
name: Phase
- type: vertical-stack
cards:
- type: markdown
Expand Down Expand Up @@ -1959,6 +2002,10 @@ views:
icon: mdi:power-plug-battery
heading: Marstek M2
heading_style: title
- type: entities
entities:
- entity: input_select.marstek_m2_phase
name: Phase
- type: vertical-stack
cards:
- type: markdown
Expand Down Expand Up @@ -2024,6 +2071,10 @@ views:
icon: mdi:power-plug-battery
heading: Marstek M3
heading_style: title
- type: entities
entities:
- entity: input_select.marstek_m3_phase
name: Phase
- type: vertical-stack
cards:
- type: markdown
Expand Down Expand Up @@ -2089,6 +2140,10 @@ views:
icon: mdi:power-plug-battery
heading: Marstek M4
heading_style: title
- type: entities
entities:
- entity: input_select.marstek_m4_phase
name: Phase
- type: vertical-stack
cards:
- type: markdown
Expand Down Expand Up @@ -2154,6 +2209,10 @@ views:
icon: mdi:power-plug-battery
heading: Marstek M5
heading_style: title
- type: entities
entities:
- entity: input_select.marstek_m5_phase
name: Phase
- type: vertical-stack
cards:
- type: markdown
Expand Down Expand Up @@ -2219,6 +2278,10 @@ views:
icon: mdi:power-plug-battery
heading: Marstek M6
heading_style: title
- type: entities
entities:
- entity: input_select.marstek_m6_phase
name: Phase
- type: vertical-stack
cards:
- type: markdown
Expand Down
Loading