Skip to content
Draft
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
13 changes: 13 additions & 0 deletions packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,18 @@ sensor:
id: balancer${bms_id}_delta_cell_voltage
device_id: balancer_${bms_id}
name: "delta cell voltage"
filters:
- throttle_average: 30s
- round: 3
average_cell_voltage:
id: balancer${bms_id}_average_cell_voltage
device_id: balancer_${bms_id}
name: "average cell voltage"
filters:
- sliding_window_moving_average:
window_size: 8
send_every: 4
- round: 3
cell_voltage_1:
id: balancer${bms_id}_cell_v_01
device_id: balancer_${bms_id}
Expand Down Expand Up @@ -238,6 +246,11 @@ sensor:
id: balancer${bms_id}_total_voltage
device_id: balancer_${bms_id}
name: "total voltage"
filters:
- sliding_window_moving_average:
window_size: 8
send_every: 4
- round: 2
temperature_sensor_1:
id: balancer${bms_id}_temperature_sensor_1
device_id: balancer_${bms_id}
Expand Down
8 changes: 8 additions & 0 deletions packages/bms/bms_sensors_BASEN_RS485_full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ sensor:
id: bms${bms_id}_average_cell_voltage
device_id: bms_${bms_id}
name: "cell average voltage"
filters:
- sliding_window_moving_average:
window_size: 8
send_every: 4
- round: 3
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
device_id: bms_${bms_id}
Expand All @@ -187,6 +192,9 @@ sensor:
id: bms${bms_id}_delta_voltage_cell
device_id: bms_${bms_id}
name: "cell delta voltage"
filters:
- throttle_average: 30s
- round: 3
cell_voltage_01:
device_id: bms_${bms_id}
name: "cell voltage 01"
Expand Down
72 changes: 60 additions & 12 deletions packages/bms/bms_sensors_DEYE_CAN_module_full.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Updated : 2026.02.05
# Version : 1.1.10
# Updated : 2026.02.21
# Version : 1.1.11
# GitHub : https://github.com/GHswitt/esphome-yambms

# YamBMS ( Yet another multi-BMS Merging Solution )
Expand Down Expand Up @@ -309,9 +309,10 @@ sensor:
state_class: 'measurement'
accuracy_decimals: 2
filters:
- timeout:
timeout: 60s
value: !lambda return 0;
- timeout:
timeout: 60s
value: !lambda return 0;
- throttle: ${bms_update_interval}

# Current
- platform: template
Expand All @@ -322,6 +323,9 @@ sensor:
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 1
filters:
- round: 1
- throttle: ${bms_update_interval}

# Battery power (calculated)
- platform: template
Expand All @@ -334,6 +338,8 @@ sensor:
accuracy_decimals: 0
lambda: |-
return id(bms${bms_id}_total_voltage).state * id(bms${bms_id}_current).state;
filters:
- throttle: ${bms_update_interval}

# Charging power: Calculated from voltage and current
- platform: template
Expand All @@ -347,6 +353,9 @@ sensor:
lambda: |-
if (id(bms${bms_id}_current).state > 0) return id(bms${bms_id}_total_voltage).state * id(bms${bms_id}_current).state;
else return 0;
filters:
- round: 0
- throttle: ${bms_update_interval}

# Discharging power: Calculated from voltage and current
- platform: template
Expand All @@ -360,6 +369,9 @@ sensor:
lambda: |-
if (id(bms${bms_id}_current).state < 0) return id(bms${bms_id}_total_voltage).state * -id(bms${bms_id}_current).state;
else return 0;
filters:
- round: 0
- throttle: ${bms_update_interval}

# SoC
- platform: template
Expand All @@ -370,6 +382,9 @@ sensor:
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 1
filters:
- round: 1
- throttle: ${bms_update_interval}

# Battery capacity
- platform: template
Expand All @@ -384,6 +399,8 @@ sensor:
uint8_t module_count = id(deye${deye_id}_module_amount).state;
if (module_count < 1) module_count = 1;
return id(deye${deye_id}_battery_capacity).state / module_count;
filters:
- throttle: ${bms_update_interval}

# Remaining capacity - Calculated from SoC and battery capacity
- platform: template
Expand All @@ -396,8 +413,9 @@ sensor:
accuracy_decimals: 0
filters:
- or:
- throttle: 10s
- throttle: ${bms_update_interval}
- delta: 1
- round: 0
lambda: |-
return (id(bms${bms_id}_state_of_charge).state * id(bms${bms_id}_battery_capacity).state) / 100;

Expand Down Expand Up @@ -429,7 +447,7 @@ sensor:
- delta: 1
lambda: |-
return id(bms${bms_id}_charging_cycles_raw).state * id(bms${bms_id}_battery_capacity).state;

# Max. charge current
- platform: template
name: "max charge current"
Expand All @@ -439,6 +457,8 @@ sensor:
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- throttle: ${bms_update_interval}

# Max. discharge current
- platform: template
Expand All @@ -449,6 +469,8 @@ sensor:
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- throttle: ${bms_update_interval}

# Max. cell voltage
- platform: template
Expand All @@ -459,6 +481,12 @@ sensor:
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 3
filters:
- round: 3
- throttle: ${bms_update_interval}
- sliding_window_moving_average:
window_size: 8
send_every: 2

# Max. voltage cell: Only with InterCAN enabled
- platform: template
Expand All @@ -481,6 +509,12 @@ sensor:
on_value:
then:
- component.update: bms${bms_id}_imbalance
filters:
- round: 3
- throttle: ${bms_update_interval}
- sliding_window_moving_average:
window_size: 8
send_every: 2

# Min. voltage cell: Only with InterCAN enabled
- platform: template
Expand All @@ -500,6 +534,12 @@ sensor:
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
filters:
- delta: 1
- throttle: ${bms_update_interval}
- exponential_moving_average:
alpha: 0.1
send_every: 4

# Min. temperature sensor (fixed)
- platform: template
Expand All @@ -521,7 +561,13 @@ sensor:
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1

filters:
- delta: 1
- throttle: ${bms_update_interval}
- exponential_moving_average:
alpha: 0.1
send_every: 4

# Max. temperature sensor (fixed)
- platform: template
id: bms${bms_id}_max_temperature_sensor
Expand Down Expand Up @@ -671,9 +717,10 @@ sensor:
unit_of_measurement: 'kWh'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 3
accuracy_decimals: 1
filters:
- throttle: 1s
- round: 1
- throttle: ${bms_update_interval}

- platform: template
name: "discharged"
Expand All @@ -682,9 +729,10 @@ sensor:
unit_of_measurement: 'kWh'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 3
accuracy_decimals: 1
filters:
- throttle: 1s
- round: 1
- throttle: ${bms_update_interval}

- platform: template
id: "bms${bms_id}_operation_mode_internal"
Expand Down
Loading