Correct min/max cells (#140)

This commit is contained in:
Andrew Rankin authored and GitHub committed 2025-12-18 19:06:40 +00:00
1 parent 84eb560c66
commit 59cb64181e
2 files changed
+47 -54

No files matched your search

+38 -38
View File
@@ -1,38 +1,38 @@
# Updated : 2025.12.08
# Version : 2.0.0
# GitHub : https://github.com/RAR/esphome-eg4-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
# BMS
bms_model: "EG4 LLV2"
bms_protocol: "RS485"
# Modbus
eg4_modbus_id: modbus_eg4
external_components:
- source: github://RAR/esphome-eg4-bms@v1.0.0
refresh: 0s
uart:
- id: !extend ${eg4_modbus_uart_id}
baud_rate: ${eg4_modbus_baud_rate}
eg4_modbus:
- uart_id: ${eg4_modbus_uart_id}
id: ${eg4_modbus_id}
# Updated : 2025.12.08
# Version : 2.0.0
# GitHub : https://github.com/RAR/esphome-eg4-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
# BMS
bms_model: "EG4 LLV2"
bms_protocol: "RS485"
# Modbus
eg4_modbus_id: modbus_eg4
external_components:
- source: github://RAR/esphome-eg4-bms@v1.0.1
refresh: 0s
uart:
- id: !extend ${eg4_modbus_uart_id}
baud_rate: ${eg4_modbus_baud_rate}
eg4_modbus:
- uart_id: ${eg4_modbus_uart_id}
id: ${eg4_modbus_id}
@@ -27,7 +27,7 @@ packages:
# +--------------------------------------+
external_components:
- source: github://RAR/esphome-eg4-bms@v1.0.0
- source: github://RAR/esphome-eg4-bms@v1.0.1
refresh: 0s
eg4_bms:
@@ -252,21 +252,14 @@ sensor:
id: bms${bms_id}_protection_bitmask
device_id: bms_${bms_id}
name: "${name} ${bms_name} protection bitmask"
# Required sensors - min/max voltage cell numbers (calculated by component)
- platform: template
name: "${name} ${bms_name} min voltage cell"
id: bms${bms_id}_min_voltage_cell
device_id: bms_${bms_id}
accuracy_decimals: 0
lambda: return 0; # Placeholder, calculated by component
- platform: template
name: "${name} ${bms_name} max voltage cell"
id: bms${bms_id}_max_voltage_cell
device_id: bms_${bms_id}
accuracy_decimals: 0
lambda: return 0; # Placeholder, calculated by component
min_voltage_cell:
id: bms${bms_id}_min_voltage_cell
name: "${name} ${bms_name} min voltage cell"
device_id: bms_${bms_id}
max_voltage_cell:
id: bms${bms_id}_max_voltage_cell
device_id: bms_${bms_id}
name: "${name} ${bms_name} max voltage cell"
# Required sensors cannot be retrieved from BMS
- platform: template