Sleeper85
Sunday handyman
- Joined
- Nov 28, 2022
- Messages
- 552
And possibly I completely misunderstood what you meant by "_total" (I assumed _total being the sum of all BMS Currents), because that's what a "Total" means to me at least.
Global variables are either counters, or are prefixed with total_ min_ or max_
So you understood it correctly, total_ is the sum of all BMS values. Depending on the sensors this could become an average or remain a total value.
It is very simple :
C:
id(${yambms_id}_total_xyz)
C:
id(${yambms_id}_xyz).state
If I take the example of power, it goes without saying that the published value is a sum of all the BMS that can be combined.
C:
id(${yambms_id}_power).publish_state(id(${yambms_id}_total_power));
YAML:
# power SUM
- platform: template
id: ${yambms_id}_power
name: "${name} ${yambms_name} Power (Σ)"
update_interval: ${yambms_update_interval}
accuracy_decimals: 0
unit_of_measurement: W
device_class: power
filters:
- or:
- throttle: 10s
- delta: 1
A sensor prefixed with ${yambms_id} is a YamBMS sensor so it is clear that it is a value of what you can put in the "Control / Regulation by ESP32" category.
I don't see the point of adding "esp32_controller" at the end of the sensor name.
All new YamBMS sensors have the same id name as JK-BMS sensors but are prefixed with ${yambms_id}.
I hope this information is helpful because I feel like I'm wasting my time explaining all this.