esphome-jk-bms: Can't get the "switches" to work properly using BLE

Hi, I am not getting the switches to work properly.

I am using esphome-jk-bms to control 2x JK-B2A24S20P.

The actual “switches” saves its state, i.e. if I reload the page in homeassistant, the state of the switches persists, but it doesn’t change the the function in the first BMS only in the second. for example in the screenshot below I flipped the switch “discharging” to off-position on both bms’s, but it still says “discharging: on” on BMS 1

Here is a portion of my .yaml file:

esp32_ble_tracker:

ble_client:
  - mac_address: ${mac_address_1}
    id: client1
  - mac_address: ${mac_address_2}
    id: client2
    

jk_bms_ble:
  - ble_client_id: client1
    protocol_version: ${protocol_version}
    throttle: 5s
    id: bms1
  - ble_client_id: client2
    protocol_version: ${protocol_version}
    throttle: 5s
    id: bms2


switch:
  - platform: jk_bms_ble
    jk_bms_ble_id: bms1
    charging:
      name: "${name}-1 charging"
    discharging:
      name: "${name}-1 discharging"
    balancer:
      name: "${name}-1 balancer"
  - platform: jk_bms_ble
    jk_bms_ble_id: bms2
    charging:
      name: "${name}-2 charging"
    discharging:
      name: "${name}-2 discharging"
    balancer:
      name: "${name}-2 balancer"


Skärmavbild 2022-08-07 kl  21 53 38

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Yes!!! That fixed it! Now it is working as it should.

Thank you!

I will give you a complete serial log as soon as I get back home (later this afternoon)