From d0e42a27a4edffbc092c50b8600e4f2194e913be Mon Sep 17 00:00:00 2001 From: Sleeper85 Date: Mon, 7 Jul 2025 20:53:18 +0200 Subject: [PATCH] Create bms_options_auto_balance_switch.yaml --- .../bms/bms_options_auto_balance_switch.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/bms/bms_options_auto_balance_switch.yaml diff --git a/packages/bms/bms_options_auto_balance_switch.yaml b/packages/bms/bms_options_auto_balance_switch.yaml new file mode 100644 index 0000000..e484101 --- /dev/null +++ b/packages/bms/bms_options_auto_balance_switch.yaml @@ -0,0 +1,28 @@ +# Updated : 2025.07.07 +# Version : 1.1.1 +# GitHub : https://github.com/Sleeper85/esphome-yambms + +# 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 . + +interval: + - interval: ${bms_update_interval} + then: + - lambda: |- + if (id(bms${bms_id}_max_cell_voltage).state > ${bms_top_v}) + id(bms${bms_id}_balance_switch).turn_on(); + else if (id(bms${bms_id}_min_cell_voltage).state < ${bms_bot_v}) + id(bms${bms_id}_balance_switch).turn_on(); + else id(bms${bms_id}_balance_switch).turn_off();