I had a bit of an issue with my setup because it was a bit more "unique" that most people. I have a mix of battery types, and BAUD rates. I was forced to set up a second instance of Home Assistant (could have also been done with an EPS32 I suppose but I had a spare Pi handy) and anything on the slower 9600 baud rate (EG4 batteries) was fed via an MQTT bridge into my main HA setup.
In case someone else runs into a similar situation here is a quick AI generated synopsis as well as code which may help you further.
Master Engineering Blueprint & Deployment Documentation
Ingesting, Isolating, and Synchronizing Multi-Pack Parallel Arrays: EG4 (9,600 Baud Modbus RTU) and JK BMS (115,200 Baud Inter-BMS Parallel Sniffing via Seplos USB Adapter)
1. Project Lineage & Reference Ecosystems
This production-grade energy management architecture integrates hardware drivers, serial communications timing loops, and state synchronization layers into a reliable multi-node pipeline. The implementation parameters are grounded in and verified by the following engineering resources:
2. Core Architecture & System Synopsis
Why a Dual-Instance Topology is Required
Interfacing industrial lithium battery storage arrays from different manufacturers onto a single computer node forces a fundamental hardware bottleneck:
Serial Bus Baud Rate Contention. Running multiple aggressive serial communication routines into a single Home Assistant OS stack triggers internal kernel resource scheduling lockups, leading to corrupted data frames, packet tearing, and persistent integration dropouts.
The Serial Port Bottleneck Breakdown
The communications buses of your two battery systems utilize fundamentally conflicting electrical profiles, logical frameworks, and bus timings:
- JK BMS Clustered Array (115,200 Baud): Operates at an asynchronous speed of 115,200 bps using an RS485 network topology. Rather than processing structured master-slave request packets, this system relies on the high-speed parallel sharing of status registers. The monitoring node must intercept this traffic rapidly to prevent driver input buffer overflow or packet truncation.
- EG4 Clustered Array (9,600 Baud): Operates at a standard clock index of 9,600 bps over Modbus RTU. This bus uses a half-duplex layout requiring explicit request and echo pause windows. To initialize communications cleanly and safeguard parallel expansion boundaries, the primary battery module on this loop must be assigned Modbus ID 2.
Mechanism of Single-Instance System Failure
When a single host operating system tries to manage both interfaces on the same physical USB driver controller, serial port buffer contention happens immediately. While the system's core processing loop halts for several milliseconds waiting for the slow 9600 baud EG4 master-slave echo routine to resolve over Wires 1 and 2, the high-speed 115200 baud JK BMS hardware stream continues to flood the serial port driver input array. This results in immediate
input buffer overruns, corrupting data frames, causing CRC validation failures, and causing both battery clusters to stop responding.
The Split-Processing Remedy & MQTT Bridging
By offloading the low-speed 9600 baud EG4 Modbus bus to an isolated secondary host machine (
HA2), hardware resource lockups are completely resolved. HA2 focuses its execution loops on the steady Modbus queries. It parses the binary arrays, formats the telemetry into clean network payloads, and streams it across an ethernet bridge to your network's centralized MQTT broker.
This layout completely protects the primary hardware on the
MAIN instance, allowing it to apply 100% of its native serial resources to capture the high-velocity 115,200 bps data from the JK BMS without dropping single frames.
Overcoming "MQTT Statestream Amnesia"
The native Home Assistant mqtt_statestream engine only issues updates over the network broker when an entity state explicitly shifts value. While effective for dynamic values like power or voltage, it remains totally silent for stable metrics like Cycle Counts, State of Health, Warnings, or slow-moving inner temperatures.
If the central server reboots, these lines default to an empty Unknown state. To fix this, HA2 implements a forced brute-force sync routine: every 30 seconds, it explicitly triggers a new read across
every Modbus register path and force-publishes it across the network bridge with a persistent retain: true flag, guaranteeing immediate restoration upon central node initialization.
3. Physical Layer Wiring, Addressing, & Port Maps
EG4 Modbus Physical Wiring & Multi-Pack DIP Scaling
- Port Selection: Connection must be made directly into the twin Parallel RS485 Communication Ports located on the far right of the battery's front interface board (as highlighted in red on the master board diagram).
- Wiring Pin Array Mapping: The RJ45 communication path must wire exclusively into Wires 1 and 2:
- Pin 1 (Orange/White wire): Connects to differential RS485-B (Negative signal input terminal).
- Pin 2 (Orange wire): Connects to differential RS485-A (Positive signal input terminal).
- Pins 4 and 5 must be omitted. These lines do not carry serial traffic on this interface and will introduce line distortion if connected to the Modbus adapter.
- The Slave ID to DIP Switch Mapping Law: In the Home Assistant Modbus configuration block, the slave: 2 assignment correlates directly to the physical binary positions of DIP Switch #2 set on the battery's hardware switch block.
- Multi-Battery Parallel Scaling: To scale the system with multiple parallel EG4 batteries, every single pack added to the array requires a unique battery ID. This requires a strict, sequential DIP switch increase on the front face of each subsequent battery pack. Pack 1 is addressed to Modbus ID 2, Pack 2 climbs sequentially to ID 3, Pack 3 to ID 4, Pack 4 to ID 5, and so on.
- The Collision Overlap Penalty: Failing to step these parameters sequentially causes an immediate data collision on the shared Modbus line. The devices will cross-talk, jam the serial bus, scramble entity states, and force frame rejections inside the host kernel driver.
JK BMS Parallel Sniffing Setup (SolarAssistant Option 1 Layout)
- Hardware Profile: Deployed utilizing an industrial Seplos USB-to-RS485 adapter combined with a standard RJ45 networking patch cable.
- Port Configuration: Wired strictly according to BMS Port - Option 1 specifications. On this sniffing hardware node, Wires 1 and 2 are NOT used.
- Functional Methodology: Instead of acting as an active polling master on the loop, the Seplos adapter utilizes its custom pin alignment to tap the active communication lines flowing between the parallel-linked JK BMS modules. By passively snooping on the inter-BMS chatter, it intercepts the live 115,200 baud telemetry frames.
- Multi-Battery Parallel Scaling: Just like the Modbus array, when managing a clustered multi-pack JK BMS network, every single battery pack requires a unique battery ID assignment within its internal software firmware settings screen. This keeps the snooped data segments neatly divided by array index. If IDs overlap, the sniffing script cannot resolve individual cell matrices, causing the telemetry fields to overwrite each other continuously.
4. Host OS Port Isolation (Persistent Device Bindings)
To eliminate USB connection path shifting during system updates or hardware reboots, virtual port names (like /dev/ttyUSB0) must be abandoned. Both systems must map their physical serial chips via immutable hardware device paths.
Identifying Persistent Hardware Serial Paths
On both your
MAIN and
HA2 system layers, locate your paths by navigating to:
Settings -->
System -->
Hardware --> Click the three dots (Top Right) --> Select
All Hardware.
Locate and expand the
serial tree branch. Isolate the specific identifier paths associated with each physical chipset type (such as FTDI, CH341, or CP210x):
In the example below the following USB to RS485 adapters were found (but yours may be different). Assign as intended for use so they get uniquely assigned.
- EG4 Modbus Adapter Link (HA2 Node Port): /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
- JK BMS Seplos Adapter Link (MAIN Node Port): /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A10KV8X4-if00-port0
5. HA2 Node (The Poller): Master
Apply this structural configuration file to your dedicated
HA2 poller machine. This file establishes the network link to the MQTT broker hosted on the central server (
MAIN) and configures the native Home Assistant Modbus register ingestion mappings matching the EG4 communication specification.
MULTI-BATTERY PARALLEL SCALING CALLOUT
If you expand your power array with a second or third EG4 battery pack, you must duplicate the sensor configuration block under the identical modbus hub instance.
Each additional physical pack requires an incremented, unique slave ID matching its front panel DIP switch configuration. >
Below, the sensor stack for the primary battery pack (slave: 2) is active. Directly following it is a prototype block for a subsequent battery configured for a third battery setup (slave: 4). It has been commented out (REM'd out) with # notation. To deploy additional batteries, copy this structure, adjust the slave ID sequentially (3, 4, 5...), modify the name / unique_id hooks to preserve entity isolation, and uncomment the lines.
Code:
# Loads default set of integrations. Do not remove.
default_config:
# ==============================================================================
# MQTT CLIENT LINK: Network Bridge connection to MAIN Instance Broker
# ==============================================================================
mqtt:
broker: 192.168.1.100 # CHANGE THIS to the exact physical IP address of your MAIN instance
port: 1883
username: your_mqtt_broker_username # Configured in MAIN Mosquitto MQTT Add-on
password: your_mqtt_broker_password
# ==============================================================================
# NATIVE MODBUS RTU CONFIGURATION: Direct Register Reading from slave address 2
# ==============================================================================
modbus:
- name: eg4
type: serial
method: rtu
port: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 # LOCKED PATH
baudrate: 9600
bytesize: 8
stopbits: 1
parity: N
sensors:
# ------------------------------------------------------------------------
# PACK #1: ACTIVE CONFIGURATION (Slave 2 / DIP Switch #2)
# ------------------------------------------------------------------------
- name: "EG4 Battery Voltage"
unique_id: eg4_battery_voltage_raw
slave: 2 # Matches physical DIP switch position 2
address: 0
input_type: holding
data_type: uint16
scale: 0.01
precision: 2
unit_of_measurement: "V"
device_class: voltage
- name: "EG4 Battery Current"
unique_id: eg4_battery_current_raw
slave: 2
address: 1
input_type: holding
data_type: int16
scale: 0.01
precision: 2
unit_of_measurement: "A"
device_class: current
- name: "EG4 Remaining Capacity"
unique_id: eg4_remaining_capacity_raw
slave: 2
address: 21
input_type: holding
data_type: uint16
unit_of_measurement: "Ah"
- name: "EG4 State of Health"
unique_id: eg4_state_of_health_raw
slave: 2
address: 23
input_type: holding
data_type: uint16
unit_of_measurement: "%"
- name: "EG4 State of Charge"
unique_id: eg4_state_of_charge_raw
slave: 2
address: 24
input_type: holding
data_type: uint16
unit_of_measurement: "%"
device_class: battery
- name: "EG4 Status"
unique_id: eg4_status_raw
slave: 2
address: 25
input_type: holding
data_type: uint16
- name: "EG4 Warnings"
unique_id: eg4_warnings_raw
slave: 2
address: 26
input_type: holding
data_type: uint16
- name: "EG4 Protections"
unique_id: eg4_protections_raw
slave: 2
address: 27
input_type: holding
data_type: uint16
- name: "EG4 Errors"
unique_id: eg4_errors_raw
slave: 2
address: 28
input_type: holding
data_type: uint16
- name: "EG4 Cycle Count"
unique_id: eg4_cycle_count_raw
slave: 2
address: 29
input_type: holding
data_type: uint32
- name: "EG4 PCB Temp"
unique_id: eg4_pcb_temp_raw
slave: 2
address: 18
input_type: holding
data_type: int16
unit_of_measurement: "°C"
device_class: temperature
- name: "EG4 Average Cell Temp"
unique_id: eg4_average_cell_temp_raw
slave: 2
address: 19
input_type: holding
data_type: int16
unit_of_measurement: "°C"
device_class: temperature
- name: "EG4 Max Cell Temp"
unique_id: eg4_max_cell_temp_raw
slave: 2
address: 20
input_type: holding
data_type: int16
unit_of_measurement: "°C"
device_class: temperature
# --- 16S Individual Cell Voltage Mappings ---
- name: "EG4 Battery Cell 1 Voltage"
slave: 2
address: 2
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 2 Voltage"
slave: 2
address: 3
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 3 Voltage"
slave: 2
address: 4
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 4 Voltage"
slave: 2
address: 5
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 5 Voltage"
slave: 2
address: 6
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 6 Voltage"
slave: 2
address: 7
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 7 Voltage"
slave: 2
address: 8
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 8 Voltage"
slave: 2
address: 9
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 9 Voltage"
slave: 2
address: 10
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 10 Voltage"
slave: 2
address: 11
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 11 Voltage"
slave: 2
address: 12
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 12 Voltage"
slave: 2
address: 13
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 13 Voltage"
slave: 2
address: 14
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 14 Voltage"
slave: 2
address: 15
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 15 Voltage"
slave: 2
address: 16
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
- name: "EG4 Battery Cell 16 Voltage"
slave: 2
address: 17
input_type: holding
data_type: uint16
scale: 0.001
unit_of_measurement: "V"
# --- Hardcoded/Static Device Configurations ---
- name: "EG4 Model"
slave: 2
address: 105
input_type: holding
data_type: custom
structure: "24s"
- name: "EG4 Firmware"
slave: 2
address: 117
input_type: holding
data_type: custom
structure: "6s"
- name: "EG4 Serial Number"
slave: 2
address: 120
input_type: holding
data_type: custom
structure: "16s"
# ------------------------------------------------------------------------
# PACK #3 EXAMPLE: COMMENTED PROTOTYPE ARRAY (Slave 4 / DIP Switch #4)
# To use a 3rd battery pack, uncomment the block below (#) and add variables to MQTT sync
# ------------------------------------------------------------------------
# - name: "EG4 Battery P3 Voltage"
# unique_id: eg4_battery_p3_voltage_raw
# slave: 4 # Sequential shift to match 3rd battery configuration boundaries
# address: 0
# input_type: holding
# data_type: uint16
# scale: 0.01
# precision: 2
# unit_of_measurement: "V"
# device_class: voltage
#
# - name: "EG4 Battery P3 Current"
# unique_id: eg4_battery_p3_current_raw
# slave: 4
# address: 1
# input_type: holding
# data_type: int16
# scale: 0.01
# precision: 2
# unit_of_measurement: "A"
# device_class: current
#
# - name: "EG4 P3 Remaining Capacity"
# unique_id: eg4_p3_remaining_capacity_raw
# slave: 4
# address: 21
# input_type: holding
# data_type: uint16
# unit_of_measurement: "Ah"
#
# - name: "EG4 P3 State of Charge"
# unique_id: eg4_p3_state_of_charge_raw
# slave: 4
# address: 24
# input_type: holding
# data_type: uint16
# unit_of_measurement: "%"
# device_class: battery
#
# - name: "EG4 P3 Cycle Count"
# unique_id: eg4_p3_cycle_count_raw
# slave: 4
# address: 29
# input_type: holding
# data_type: uint32
6. HA2 Node (The Poller): Master
Deploy this automation configuration directly within the automations.yaml file of your dedicated poller machine (
HA2). This script drives the for_each processing block to update the Modbus registers and execute persistent network data broadcasts.
automations.yaml
Code:
alias: Force EG4 ALL Data MQTT Sync
description: "Brute-force updates and publishes every EG4 Modbus value to MQTT every 30 seconds"
id: force_eg4_mqtt_sync
triggers:
- event: start
trigger: homeassistant
- seconds: /30
trigger: time_pattern
actions:
- repeat:
for_each:
# --- Overview & Power ---
- sensor.eg4_status
- sensor.eg4_state_of_charge
- sensor.eg4_battery_power
- sensor.eg4_battery_voltage
- sensor.eg4_battery_current
- sensor.eg4_remaining_capacity
- sensor.eg4_state_of_health
- sensor.eg4_cycle_count
- sensor.eg4_pack_current_enhanced
# --- Health & Temperatures ---
- sensor.eg4_cell_delta
- sensor.eg4_min_cell_voltage
- sensor.eg4_max_cell_voltage
- sensor.eg4_average_cell_temp
- sensor.eg4_max_cell_temp
- sensor.eg4_pcb_temp
- sensor.eg4_heating_status
- sensor.eg4_battery_temp_1
- sensor.eg4_battery_temp_2
- sensor.eg4_battery_temp_3
- sensor.eg4_battery_temp_4
# --- Diagnostics ---
- sensor.eg4_errors
- sensor.eg4_warnings
- sensor.eg4_protections
- sensor.eg4_firmware
- sensor.eg4_model
- sensor.eg4_serial_number
# --- Individual Cells ---
- sensor.eg4_battery_cell_01_voltage
- sensor.eg4_battery_cell_02_voltage
- sensor.eg4_battery_cell_03_voltage
- sensor.eg4_battery_cell_04_voltage
- sensor.eg4_battery_cell_05_voltage
- sensor.eg4_battery_cell_06_voltage
- sensor.eg4_battery_cell_07_voltage
- sensor.eg4_battery_cell_08_voltage
- sensor.eg4_battery_cell_09_voltage
- sensor.eg4_battery_cell_10_voltage
- sensor.eg4_battery_cell_11_voltage
- sensor.eg4_battery_cell_12_voltage
- sensor.eg4_battery_cell_13_voltage
- sensor.eg4_battery_cell_14_voltage
- sensor.eg4_battery_cell_15_voltage
- sensor.eg4_battery_cell_16_voltage
# --- Limits ---
- sensor.eg4_max_discharge_limit
- sensor.eg4_max_charge_limit
# ----------------------------------------------------------------------
# PROTOTYPE PACK #3 EXTENSION PATH:
# If deploying a 3rd battery pack, uncomment the variables below to pull them into the loop
# ----------------------------------------------------------------------
# - sensor.eg4_battery_p3_voltage
# - sensor.eg4_battery_p3_current
# - sensor.eg4_p3_remaining_capacity
# - sensor.eg4_p3_state_of_charge
# - sensor.eg4_p3_cycle_count
sequence:
# 1. Force the Modbus integration to execute an immediate serial bus query
- action: homeassistant.update_entity
target:
entity_id: "{{ repeat.item }}"
# 2. Extract state payload and force-publish over network with retain active
- action: mqtt.publish
data:
topic: "ha2/{{ repeat.item | replace('.', '/') }}/state"
payload: "{{ states(repeat.item) }}"
retain: true
7. MAIN Node: System-Level Ingestion File (Fully Commented Architecture)
Apply this master layout block directly into the configuration.yaml file of your primary central hub machine (
MAIN). Every module, mathematical string parser, and network listener contains thorough inline documentation detailing its operational rationale.
configuration.yaml
Code:
# ==============================================================================
# CORE SYSTEM INITIALIZATION
# ==============================================================================
# Loads default set of core Home Assistant integrations. Do not alter or remove.
default_config:
# Mount frontend theme structures from the local configuration subfolder directory
frontend:
themes: !include_dir_merge_named themes
# Establish mapping links for standard component configurations split into external files
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
# ==============================================================================
# LONG-TERM STATISTICS PLATFORM: 24-Hour Rolling Peaks Evaluation
# ==============================================================================
# These tracking entities run historical scans across the local state database.
# They monitor dynamic current readings over a rolling window to calculate charge/discharge peaks.
sensor:
# --- JK BMS: Max Charging Peak Tracking ---
- platform: statistics
name: "BMS 1 24h Max Charge Current"
entity_id: sensor.bms_1_courant_total
state_characteristic: value_max # Evaluates the highest positive numeric value recorded
max_age:
hours: 24 # Sliding history calculation duration limits
# --- JK BMS: Max Discharging Peak Tracking ---
- platform: statistics
name: "BMS 1 24h Max Discharge Current Raw"
entity_id: sensor.bms_1_courant_total
state_characteristic: value_min # Evaluates the lowest negative numeric value recorded
max_age:
hours: 24
# --- EG4 Module: Max Charging Peak Tracking ---
- platform: statistics
name: "EG4 24h Max Charge Current"
entity_id: sensor.eg4_battery_current
state_characteristic: value_max # Captures maximum charging amperage inflow
max_age:
hours: 24
# --- EG4 Module: Max Discharging Peak Tracking ---
- platform: statistics
name: "EG4 24h Max Discharge Current Raw"
entity_id: sensor.eg4_battery_current
state_characteristic: value_min # Captures lowest discharging amperage outflow
max_age:
hours: 24
# ==============================================================================
# UNIFIED STATE TEMPLATES: Data Conversions, Filtering Math, and Cleanups
# ==============================================================================
# This layer executes continuous calculations, state safety filters,
# and metrics standardization (such as metric to imperial thermal conversions).
template:
- sensor:
# --- JK BMS: Native Percent Pass-Through ---
- name: "BMS 1 SOC"
unique_id: bms_1_soc
state: "{{ states('sensor.bms_1_soc_pourcentage') }}"
unit_of_measurement: "%"
# --- JK BMS: Polarity Inversion Power Adjuster ---
# Certain driver frameworks present discharging watts as unsigned positives.
# This template cross-references current directions to output true negative values during load.
- name: "BMS 1 Power"
unique_id: bms_1_power
device_class: power
state_class: measurement
unit_of_measurement: "W"
state: >
{% set power = states('sensor.bms_1_puissance_totale') | float(0) %}
{% set current = states('sensor.bms_1_courant_total') | float(0) %}
{% if current < 0 %}
{{ (power * -1) | round(2) }} # Forces negative integer formatting on load demand
{% else %}
{{ power | round(2) }} # Preserves positive value during solar charge inputs
{% endif %}
- name: "BMS 1 Total Voltage"
unique_id: bms_1_total_voltage
state: "{{ states('sensor.bms_1_tension_totale_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Current"
unique_id: bms_1_current
state: "{{ states('sensor.bms_1_courant_total') }}"
unit_of_measurement: "A"
# --- JK BMS: Enhanced Visual Status Formatting String ---
# Processes numeric flow characteristics to output user-friendly text descriptions.
- name: "BMS 1 Current Enhanced"
unique_id: bms_1_current_enhanced
icon: >
{% set current = states('sensor.bms_1_courant_total') | float(0) %}
{% if current > 0 %}
mdi:battery-charging
{% elif current < 0 %}
mdi:battery-arrow-down
{% else %}
mdi:battery
{% endif %}
state: >
{% set current = states('sensor.bms_1_courant_total') | float(0) %}
{% if current > 0 %}
Charging (+{{ current | abs | round(2) }} A)
{% elif current < 0 %}
Discharging (-{{ current | abs | round(2) }} A)
{% else %}
Idle
{% endif %}
# --- JK BMS: Charge Peak Rounding Filter ---
- name: "BMS 1 24h Peak Charge"
unique_id: bms_1_24h_peak_charge
unit_of_measurement: "A"
device_class: current
state: >
{% set peak = states('sensor.bms_1_24h_max_charge_current') | float(0) %}
{{ peak | round(1) if peak > 0 else 0 }}
# --- JK BMS: Discharge Peak Absolute Math Absolute Mask ---
# Inverts raw negative minimum values into clean positive scalars for UI display layouts.
- name: "BMS 1 24h Peak Discharge"
unique_id: bms_1_24h_peak_discharge
unit_of_measurement: "A"
device_class: current
state: >
{% set peak = states('sensor.bms_1_24h_max_discharge_current_raw') | float(0) %}
{{ (peak | abs) | round(1) if peak < 0 else 0 }}
- name: "BMS 1 Capacity Remaining"
unique_id: bms_1_capacity_remaining
state: "{{ states('sensor.bms_1_capacite_restante_ah') }}"
unit_of_measurement: "Ah"
- name: "BMS 1 Actual Battery Capacity"
unique_id: bms_1_actual_battery_capacity
state: "{{ states('sensor.bms_1_capacite_batterie_ah') }}"
unit_of_measurement: "Ah"
- name: "BMS 1 Charging Cycles"
unique_id: bms_1_charging_cycles
state: "{{ states('sensor.bms_1_nombre_cycle') }}"
- name: "BMS 1 Cycle Capacity"
unique_id: bms_1_cycle_capacity
state: "{{ states('sensor.bms_1_cycle_capacite_ah') }}"
unit_of_measurement: "Ah"
- name: "BMS 1 Balancing Current"
unique_id: bms_1_balancing_current
state: "{{ states('sensor.bms_1_balance_courant') }}"
unit_of_measurement: "A"
- name: "BMS 1 Power Tube Temperature"
unique_id: bms_1_power_tube_temperature
state: "{{ states('sensor.bms_1_mos_temp') }}"
unit_of_measurement: "°C"
- name: "BMS 1 Hardware Version"
unique_id: bms_1_hardware_version
state: "{{ states('sensor.bms_1_bms_fw') }}"
- name: "BMS 1 Software Version"
unique_id: bms_1_software_version
state: "{{ states('sensor.bms_1_bms_sw') }}"
- name: "BMS 1 Delta Cell Voltage"
unique_id: bms_1_delta_cell_voltage
state: "{{ states('sensor.bms_1_cell_voltage_delta') }}"
unit_of_measurement: "V"
- name: "BMS 1 Average Cell Voltage"
unique_id: bms_1_average_cell_voltage
state: "{{ states('sensor.bms_1_cell_voltage_average') }}"
unit_of_measurement: "V"
# --- JK BMS: 16S Individual Cell Raw Entity Trackers ---
- name: "BMS 1 Cell Voltage 1"
unique_id: bms_1_cell_voltage_1
state: "{{ states('sensor.bms_1_cell_1_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 2"
unique_id: bms_1_cell_voltage_2
state: "{{ states('sensor.bms_1_cell_2_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 3"
unique_id: bms_1_cell_voltage_3
state: "{{ states('sensor.bms_1_cell_3_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 4"
unique_id: bms_1_cell_voltage_4
state: "{{ states('sensor.bms_1_cell_4_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 5"
unique_id: bms_1_cell_voltage_5
state: "{{ states('sensor.bms_1_cell_5_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 6"
unique_id: bms_1_cell_voltage_6
state: "{{ states('sensor.bms_1_cell_6_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 7"
unique_id: bms_1_cell_voltage_7
state: "{{ states('sensor.bms_1_cell_7_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 8"
unique_id: bms_1_cell_voltage_8
state: "{{ states('sensor.bms_1_cell_8_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 9"
unique_id: bms_1_cell_voltage_9
state: "{{ states('sensor.bms_1_cell_9_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 10"
unique_id: bms_1_cell_voltage_10
state: "{{ states('sensor.bms_1_cell_10_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 11"
unique_id: bms_1_cell_voltage_11
state: "{{ states('sensor.bms_1_cell_11_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 12"
unique_id: bms_1_cell_voltage_12
state: "{{ states('sensor.bms_1_cell_12_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 13"
unique_id: bms_1_cell_voltage_13
state: "{{ states('sensor.bms_1_cell_13_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 14"
unique_id: bms_1_cell_voltage_14
state: "{{ states('sensor.bms_1_cell_14_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 15"
unique_id: bms_1_cell_voltage_15
state: "{{ states('sensor.bms_1_cell_15_volt') }}"
unit_of_measurement: "V"
- name: "BMS 1 Cell Voltage 16"
unique_id: bms_1_cell_voltage_16
state: "{{ states('sensor.bms_1_cell_16_volt') }}"
unit_of_measurement: "V"
# --- JK BMS: Thermal Probes Fahrenheit Standardizers ---
# Multiplies Celsius register metrics by 1.8 and sums 32 to format for imperial UI dashboards.
- name: "BMS 1 Probe 1 Temp F"
unique_id: bms_1_probe_1_temp_f
unit_of_measurement: "°F"
device_class: temperature
state: "{{ (states('sensor.bms_1_sonde_1_temp') | float(0) * 1.8 + 32) | round(1) }}"
- name: "BMS 1 Probe 2 Temp F"
unique_id: bms_1_probe_2_temp_f
unit_of_measurement: "°F"
device_class: temperature
state: "{{ (states('sensor.bms_1_sonde_2_temp') | float(0) * 1.8 + 32) | round(1) }}"
- name: "BMS 1 Probe 3 Temp F"
unique_id: bms_1_probe_3_temp_f
unit_of_measurement: "°F"
device_class: temperature
state: "{{ (states('sensor.bms_1_sonde_3_temp') | float(0) * 1.8 + 32) | round(1) }}"
- name: "BMS 1 Probe 4 Temp F"
unique_id: bms_1_probe_4_temp_f
unit_of_measurement: "°F"
device_class: temperature
state: "{{ (states('sensor.bms_1_sonde_4_temp') | float(0) * 1.8 + 32) | round(1) }}"
# --- EG4 Module: Constant Base Capacity Value Assignment ---
- name: "EG4 Total Capacity Calculated"
unique_id: eg4_total_capacity_calculated
unit_of_measurement: "Ah"
state: "{{ 280.0 | float }}"
# --- EG4 Module: Enhanced Status Formatting String ---
- name: "EG4 Current Enhanced"
unique_id: eg4_current_enhanced
icon: >
{% set current = states('sensor.eg4_battery_current') | float(0) %}
{% if current > 0 %}
mdi:battery-charging
{% elif current < 0 %}
mdi:battery-arrow-down
{% else %}
mdi:battery
{% endif %}
state: >
{% set current = states('sensor.eg4_battery_current') | float(0) %}
{% if current > 0 %}
Charging (+{{ current | abs | round(2) }} A)
{% elif current < 0 %}
Discharging (-{{ current | abs | round(2) }} A)
{% else %}
Idle
{% endif %}
# --- EG4 Module: Charge Peak Rounding Filter ---
- name: "EG4 24h Peak Charge"
unique_id: eg4_24h_peak_charge
unit_of_measurement: "A"
device_class: current
state: >
{% set peak = states('sensor.eg4_24h_max_charge_current') | float(0) %}
{{ peak | round(1) if peak > 0 else 0 }}
# --- EG4 Module: Discharge Peak Absolute Math Mask ---
- name: "EG4 24h Peak Discharge"
unique_id: eg4_24h_peak_discharge
unit_of_measurement: "A"
device_class: current
state: >
{% set peak = states('sensor.eg4_24h_max_discharge_current_raw') | float(0) %}
{{ (peak | abs) | round(1) if peak < 0 else 0 }}
# --- EG4 Module: 16S Average Cell Voltage Matrix Ingestion ---
# Dynamically iterates through the 16 cell entities coming from HA2.
# It strips out 'unknown' or 'unavailable' data flags to calculate an accurate string average.
- name: "EG4 Battery Average Cell Voltage"
unique_id: eg4_battery_average_cell_voltage
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
state: >
{% set cells = [
states('sensor.eg4_battery_cell_1_voltage'), states('sensor.eg4_battery_cell_2_voltage'),
states('sensor.eg4_battery_cell_3_voltage'), states('sensor.eg4_battery_cell_4_voltage'),
states('sensor.eg4_battery_cell_5_voltage'), states('sensor.eg4_battery_cell_6_voltage'),
states('sensor.eg4_battery_cell_7_voltage'), states('sensor.eg4_battery_cell_8_voltage'),
states('sensor.eg4_battery_cell_9_voltage'), states('sensor.eg4_battery_cell_10_voltage'),
states('sensor.eg4_battery_cell_11_voltage'), states('sensor.eg4_battery_cell_12_voltage'),
states('sensor.eg4_battery_cell_13_voltage'), states('sensor.eg4_battery_cell_14_voltage'),
states('sensor.eg4_battery_cell_15_voltage'), states('sensor.eg4_battery_cell_16_voltage')
] %}
{% set valid = cells | reject('in', ['unknown', 'unavailable']) | map('float', -1) | reject('eq', -1) | list %}
{{ (valid | sum / valid | count) | round(3) if valid | count > 0 else 'unknown' }}
# --- EG4 Module: Clean Power Mathematical Generator ---
# Raw Modbus power registers can exhibit calculation delay.
# Multiplying real-time volts by real-time amps provides instant power calculations.
- name: "EG4 Battery Power Clean"
unique_id: eg4_battery_power_clean
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: >
{% set volts = states('sensor.eg4_battery_voltage') | float(0) %}
{% set amps = states('sensor.eg4_battery_current') | float(0) %}
{{ (volts * amps) | round(2) }}
# --- TOTAL SYSTEM ARRAYS: Luxpower Inverter Pack Isolation Formula ---
# Subtracts the clean EG4 battery wattage from the inverter's total battery sensor.
# This isolates and calculates the power flow of the JK BMS pack when they run in parallel.
- name: "Luxpower Battery 1 Power Isolated"
unique_id: luxpower_battery1_power_isolated
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: >
{% set total_power = states('sensor.luxpower_lxp_battery_power') | float(0) %}
{% set batt2_power = states('sensor.eg4_battery_power_clean') | float(0) %}
{{ (total_power - batt2_power) | round(2) }}
# ==============================================================================
# MQTT ENDPOINTS: Remote Ingestion Subscriptions Linked to HA2 Poller
# ==============================================================================
# Subscribes to the network broker topics populated by the HA2 brute-force script.
# This assigns proper device and measurement classes for Home Assistant's long-term engine.
mqtt:
sensor:
- name: "EG4 Battery Voltage"
state_topic: "ha2/sensor/eg4_battery_voltage/state"
unit_of_measurement: "V"
device_class: voltage
- name: "EG4 Battery Current"
state_topic: "ha2/sensor/eg4_battery_current/state"
unit_of_measurement: "A"
device_class: current
- name: "EG4 Battery Power"
state_topic: "ha2/sensor/eg4_battery_power/state"
unit_of_measurement: "W"
device_class: power
- name: "EG4 State of Charge"
state_topic: "ha2/sensor/eg4_state_of_charge/state"
unit_of_measurement: "%"
device_class: battery
- name: "EG4 State of Health"
state_topic: "ha2/sensor/eg4_state_of_health/state"
unit_of_measurement: "%"
- name: "EG4 Remaining Capacity"
state_topic: "ha2/sensor/eg4_remaining_capacity/state"
unit_of_measurement: "Ah"
- name: "EG4 Cycle Count"
state_topic: "ha2/sensor/eg4_cycle_count/state"
- name: "EG4 Firmware"
state_topic: "ha2/sensor/eg4_firmware/state"
- name: "EG4 Model"
state_topic: "ha2/sensor/eg4_model/state"
- name: "EG4 Serial Number"
state_topic: "ha2/sensor/eg4_serial_number/state"
- name: "EG4 Status"
state_topic: "ha2/sensor/eg4_status/state"
- name: "EG4 Heating Status"
state_topic: "ha2/sensor/eg4_heating_status/state"
- name: "EG4 Warnings"
state_topic: "ha2/sensor/eg4_warnings/state"
- name: "EG4 Protections"
state_topic: "ha2/sensor/eg4_protections/state"
- name: "EG4 Errors"
state_topic: "ha2/sensor/eg4_errors/state"
- name: "EG4 PCB Temp"
state_topic: "ha2/sensor/eg4_pcb_temp/state"
unit_of_measurement: "°F"
device_class: temperature
- name: "EG4 Max Cell Temp"
state_topic: "ha2/sensor/eg4_max_cell_temp/state"
unit_of_measurement: "°F"
device_class: temperature
- name: "EG4 Average Cell Temp"
state_topic: "ha2/sensor/eg4_average_cell_temp/state"
unit_of_measurement: "°F"
device_class: temperature
- name: "EG4 Battery Temp 1"
state_topic: "ha2/sensor/eg4_battery_temp_1/state"
unit_of_measurement: "°F"
device_class: temperature
- name: "EG4 Battery Temp 2"
state_topic: "ha2/sensor/eg4_battery_temp_2/state"
unit_of_measurement: "°F"
device_class: temperature
- name: "EG4 Battery Temp 3"
state_topic: "ha2/sensor/eg4_battery_temp_3/state"
unit_of_measurement: "°F"
device_class: temperature
- name: "EG4 Battery Temp 4"
state_topic: "ha2/sensor/eg4_battery_temp_4/state"
unit_of_measurement: "°F"
device_class: temperature
# --- 16S Individual Cell Voltages via Remote Network Ingestion ---
- name: "EG4 Battery Cell 1 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_01_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 2 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_02_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 3 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_03_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 4 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_04_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 5 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_05_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 6 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_06_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 7 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_07_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 8 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_08_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 9 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_09_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 10 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_10_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 11 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_11_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 12 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_12_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 13 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_13_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 14 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_14_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 15 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_15_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell 16 Voltage"
state_topic: "ha2/sensor/eg4_battery_cell_16_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Max Cell Voltage"
state_topic: "ha2/sensor/eg4_max_cell_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Min Cell Voltage"
state_topic: "ha2/sensor/eg4_min_cell_voltage/state"
unit_of_measurement: "V"
- name: "EG4 Battery Cell Delta"
state_topic: "ha2/sensor/eg4_cell_delta/state"
unit_of_measurement: "V"
8. Dashboard Frontend Configuration
Paste this complete code directly into the UI dashboard card config on your central server to draw the telemetry column windows.
Code:
type: grid
columns: 2
square: false
cards:
# ============================================================================
# COLUMN 1: JK BMS 300A
# ============================================================================
- type: vertical-stack
cards:
- type: grid
title: JK BMS 300A - Power & State
columns: 2
square: false
cards:
- type: gauge
entity: sensor.bms_1_soc_pourcentage
name: State of Charge (SOC)
needle: true
severity:
green: 60
yellow: 20
red: 0
- type: entities
entities:
- entity: sensor.bms_1_charge_status_text
name: Operational Status
icon: mdi:information-outline
- entity: sensor.bms_1_power
name: Battery Power
icon: mdi:flash
- entity: sensor.bms_1_tension_totale_volt
name: Total Voltage
icon: mdi:sine-wave
- entity: sensor.bms_1_current_enhanced
name: Total Amperage
- entity: sensor.bms_1_24h_peak_discharge
name: Max 24h Discharge
icon: mdi:speedometer
- type: history-graph
title: Charge / Discharge History (24h)
hours_to_show: 24
entities:
- entity: sensor.bms_1_power
name: Battery Power (W)
- type: entities
title: Battery Metrics & Health
show_header_toggle: false
entities:
- entity: sensor.bms_1_capacite_restante_ah
name: Remaining Capacity
icon: mdi:battery-charging-60
- entity: sensor.bms_1_soh_pourcentage
name: State of Health
icon: mdi:heart-pulse
- entity: sensor.bms_1_nombre_cycle
name: Completed Cycles
icon: mdi:battery-sync
- entity: sensor.bms_1_capacite_batterie_ah
name: Full Design Capacity
icon: mdi:battery
- type: divider
- entity: sensor.bms_1_cell_voltage_average
name: Average Cell Voltage
icon: mdi:calculator
- entity: sensor.bms_1_cell_voltage_delta
name: Cell Voltage Delta
icon: mdi:vector-difference
- entity: sensor.bms_1_cell_voltage_max_value
name: Highest Cell Voltage
icon: mdi:arrow-up-bold-circle-outline
- entity: sensor.bms_1_cell_voltage_min_value
name: Lowest Cell Voltage
icon: mdi:arrow-down-bold-circle-outline
- type: entities
title: Thermal Management
show_header_toggle: false
entities:
- entity: sensor.bms_1_mos_temp
name: BMS Board (MOSFET) Temp
icon: mdi:developer-board
- type: divider
- entity: sensor.bms_1_probe_1_temp_f
name: Battery Temp Sensor 1
icon: mdi:thermometer
- entity: sensor.bms_1_probe_2_temp_f
name: Battery Temp Sensor 2
icon: mdi:thermometer
- entity: sensor.bms_1_probe_3_temp_f
name: Battery Temp Sensor 3
icon: mdi:thermometer
- entity: sensor.bms_1_probe_4_temp_f
name: Battery Temp Sensor 4
icon: mdi:thermometer
- type: divider
- entity: sensor.bms_1_heating
name: Internal Heater Status
icon: mdi:fire
- type: glance
title: Individual Cell Voltages (16S)
columns: 4
entities:
- entity: sensor.bms_1_cell_1_volt
name: Cell 1
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_2_volt
name: Cell 2
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_3_volt
name: Cell 3
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_4_volt
name: Cell 4
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_5_volt
name: Cell 5
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_6_volt
name: Cell 6
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_7_volt
name: Cell 7
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_8_volt
name: Cell 8
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_9_volt
name: Cell 9
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_10_volt
name: Cell 10
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_11_volt
name: Cell 11
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_12_volt
name: Cell 12
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_13_volt
name: Cell 13
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_14_volt
name: Cell 14
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_15_volt
name: Cell 15
icon: mdi:sine-wave
- entity: sensor.bms_1_cell_16_volt
name: Cell 16
icon: mdi:sine-wave
- type: entities
title: Diagnostics & Hardware
show_header_toggle: false
entities:
- entity: sensor.bms_1_hardware_version
name: Hardware Version
icon: mdi:chip
- entity: sensor.bms_1_software_version
name: Software Version
icon: mdi:cellphone-cog
- entity: sensor.bms_1_total_runtime_formatted
name: Total Uptime
icon: mdi:clock-outline
- type: divider
- entity: sensor.bms_1_visual_status
name: Visual Status
icon: mdi:check-circle-outline
- entity: sensor.bms_1_alarm_status
name: Active Alarms / Errors
icon: mdi:alert-circle
# ============================================================================
# COLUMN 2: EG4 280AH
# ============================================================================
- type: vertical-stack
cards:
- type: grid
title: EG4 280AH - Power & State
columns: 2
square: false
cards:
- type: gauge
entity: sensor.eg4_state_of_charge
name: State of Charge (SOC)
needle: true
severity:
green: 60
yellow: 20
red: 0
- type: entities
entities:
- entity: sensor.eg4_status
name: Operational Status
icon: mdi:information-outline
- entity: sensor.eg4_battery_power
name: Battery Power
icon: mdi:flash
- entity: sensor.eg4_battery_voltage
name: Total Voltage
icon: mdi:sine-wave
- entity: sensor.eg4_current_enhanced
name: Total Amperage
- entity: sensor.eg4_24h_peak_charge
name: 24h Peak Charge
icon: mdi:speedometer
- entity: sensor.eg4_24h_peak_discharge
name: 24h Peak Discharge
icon: mdi:speedometer
- type: history-graph
title: Charge / Discharge History (24h)
hours_to_show: 24
entities:
- entity: sensor.eg4_battery_power
name: Battery Power (W)
- type: entities
title: Battery Metrics & Health
show_header_toggle: false
entities:
- entity: sensor.eg4_state_of_health
name: State of Health
icon: mdi:heart-pulse
- entity: sensor.eg4_cycle_count
name: Completed Cycles
icon: mdi:battery-sync
- entity: sensor.eg4_remaining_capacity
name: Remaining Capacity (Native)
icon: mdi:battery-charging-60
- entity: sensor.eg4_total_capacity_calculated
name: Full Design Capacity
icon: mdi:shield-check
- type: divider
- entity: sensor.eg4_battery_average_cell_voltage
name: Average Cell Voltage
icon: mdi:chart-bell-curve-cumulative
- entity: sensor.eg4_battery_cell_delta
name: Cell Voltage Delta
icon: mdi:vector-difference
- entity: sensor.eg4_battery_max_cell_voltage
name: Highest Cell Voltage
icon: mdi:arrow-up-bold-circle-outline
- entity: sensor.eg4_battery_min_cell_voltage
name: Lowest Cell Voltage
icon: mdi:arrow-down-bold-circle-outline
- type: entities
title: Thermal Management
show_header_toggle: false
entities:
- entity: sensor.eg4_pcb_temp
name: BMS Board (PCB) Temp
icon: mdi:developer-board
- entity: sensor.eg4_max_cell_temp
name: Maximum Cell Temp
icon: mdi:thermometer-high
- entity: sensor.eg4_average_cell_temp
name: Average Cell Temp
icon: mdi:thermometer
- type: divider
- entity: sensor.eg4_battery_temp_1
name: Battery Temp Sensor 1
- entity: sensor.eg4_battery_temp_2
name: Battery Temp Sensor 2
- entity: sensor.eg4_battery_temp_3
name: Battery Temp Sensor 3
- entity: sensor.eg4_battery_temp_4
name: Battery Temp Sensor 4
- type: divider
- entity: sensor.eg4_heating_status
name: Internal Heater Status
icon: mdi:fire
- type: glance
title: Individual Cell Voltages (16S)
columns: 4
entities:
- entity: sensor.eg4_battery_cell_1_voltage
name: Cell 1
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_2_voltage
name: Cell 2
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_3_voltage
name: Cell 3
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_4_voltage
name: Cell 4
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_5_voltage
name: Cell 5
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_6_voltage
name: Cell 6
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_7_voltage
name: Cell 7
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_8_voltage
name: Cell 8
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_9_voltage
name: Cell 9
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_10_voltage
name: Cell 10
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_11_voltage
name: Cell 11
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_12_voltage
name: Cell 12
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_13_voltage
name: Cell 13
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_14_voltage
name: Cell 14
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_15_voltage
name: Cell 15
icon: mdi:sine-wave
- entity: sensor.eg4_battery_cell_16_voltage
name: Cell 16
icon: mdi:sine-wave
- type: entities
title: Diagnostics & Hardware
show_header_toggle: false
entities:
- entity: sensor.eg4_model
name: Model
icon: mdi:car-battery
- entity: sensor.eg4_firmware
name: Firmware Version
icon: mdi:chip
- entity: sensor.eg4_serial_number
name: Factory Date / Serial
icon: mdi:barcode
- type: divider
- entity: sensor.eg4_warnings
name: Active Warnings
icon: mdi:alert-outline
- entity: sensor.eg4_protections
name: Active Protections
icon: mdi:shield-alert-outline
- entity: sensor.eg4_errors
name: Active Errors
icon: mdi:alert-circle
=============================
I noticed that the
JKBMS integration from Home Assistant that I linked earlier is natively in french, and some (several) of the sensors are also native in french.
I ended up using the .yaml linked above to parse out a clean english translation as well as force Fahrenheit vs Celsius for temps.
I hope this is helpful for anyone else going forward, as it it's working as intended now that I'm forcing a polling every 30 seconds regardless of status or state since some of these never (or rarely) change.