This adds 'yambms_max_inverter_charge_current' and 'yambms_max_inverter_discharge_current' substitutions. They are used to restrict the range of the charge/discharge current for easier control when the battery currents are much higher than the inverter currents.
Delete generic `board_options_itf_esp32_rs485.yaml` and replace its
usage with `board_options_itf_uart_4.yaml` in the main configuration.
Rename `yambms_rs485.yaml` to `yambms_rs485_pylon.yaml` to better
reflect its specific use for Pylontech. Update the `rs485` package
reference to `rs485_pylon` and introduce new variables
(`rs485_name`, `rs485_uart_id`, `rs485_uart_baud_rate`) for more
explicit configuration. Modify `yambms_rs485_pylon.yaml` to extend
the UART configuration and use the new `rs485_uart_id` for the
Pylontech component. This improves clarity and modularity.
This commit introduces a new output driver for YamBMS, enabling communication with inverters that use the Pylontech RS485 protocol. This provides a robust alternative to the existing CANbus interface.
The implementation is architecturally identical to the proven CANbus pattern.
Key changes include:
* **New Core Logic Package:** [`packages/yambms/yambms_rs485.yaml`](packages/yambms/yambms_rs485.yaml) contains the interval engine, proxy sensor definitions, and links core YamBMS data to the `esphome-pylontech-rs485` external component.
* **New Reusable Board Option:** [`packages/board/board_options_itf_esp32_rs485.yaml`](packages/board/board_options_itf_esp32_rs485.yaml) defines a standard 9600 baud UART interface for connecting to the inverter.
* **New Example Configuration:** [`YamBMS_RP_JK-BLE_to_Pylontech-RS485.yaml`](YamBMS_RP_JK-BLE_to_Pylontech-RS485.yaml) demonstrates a complete, working setup using the new packages.
Considerably shortens the file by 3x16 repetitions of same code to 3x2 repeats of same macro definition. If only there was a central key/tag to store macros in yaml, we only need to store the macro one time instead of six!
Things tested working on my end:
- configurable high and low cell voltage colours
- adjustable voltage spacing number
DO NOT merge before Copy paste and testing the YAML works in HA dashboard editor.
Considerably shortens the file by 3x16 repetitions of same code to 3x2 repeats of same macro definition.
If only there was a central key/tag to store macros in yaml, we only need to store the macro one time instead of six!
Copy paste and test the YAML in HA dashboard editor before merging.
Add , rounded=True
and optimized cell voltage display formatting to ensure high/low cell indication works with newest HA 2025.7.1.