I have this yaml on an es32 using BLE to interact with 2 Victron Smartshunt/BMV and a JBD BMS. My problem is that “jbd_bms” is being appended to all the sensor names. For example the BMV State of charge is named “sensor.jbd_bms_lfp_ble_state_of_charge” instead of just “sensor.lfp_ble_state_of_charge”. How can I stop this? What mistake did I make? The yaml is below:
esphome:
name: jbd_bms
external_components:
- source: github://Fabian-Schmidt/esphome-victron_ble
- source: github://syssi/esphome-jbd-bms@main
esp32:
board: mhetesp32devkit
logger:
level: INFO
# Enable Home Assistant API
api:
ota:
- platform: esphome
time:
- platform: homeassistant
id: homeassistant_time
# ethernet:
# type: LAN8720
# mdc_pin: GPIO23
# mdio_pin: GPIO18
# clk_mode: GPIO0_IN
# phy_addr: 1
# power_pin: GPIO16
wifi:
networks:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
domain:
.local
web_server:
port: 80
victron_ble:
- id: LFPBLE
mac_address: "D7....."
bindkey: "01...."
- id: SMSHUNT
mac_address: "CA:....."
bindkey: "19...."
esp32_ble_tracker:
scan_parameters:
interval: 10ms
window: 10ms
active: false
# esp32_ble_tracker:
# on_ble_advertise:
# then:
# - lambda: |-
# if (x.get_name().rfind("xiaoxiang", 0) == 0) {
# ESP_LOGI("ble_adv", "New JBD-BMS found");
# ESP_LOGI("ble_adv", " Name: %s", x.get_name().c_str());
# ESP_LOGI("ble_adv", " MAC address: %s", x.address_str().c_str());
# ESP_LOGD("ble_adv", " Advertised service UUIDs:");
# for (auto uuid : x.get_service_uuids()) {
# ESP_LOGD("ble_adv", " - %s", uuid.to_string().c_str());
# }
# }
ble_client:
- id: client0
mac_address: A4:.....
jbd_bms_ble:
- id: bms0
ble_client_id: client0
update_interval: 5s
sensor:
# Victron Sensors
# BMV
- platform: victron_ble
victron_ble_id: LFPBLE
name: "LFP-BLE Battery voltage"
id: lfp_ble_battery_voltage
type: BATTERY_VOLTAGE
- platform: victron_ble
victron_ble_id: LFPBLE
name: "LFP-BLE Current"
accuracy_decimals: 1
type: BATTERY_CURRENT
- platform: victron_ble
victron_ble_id: LFPBLE
name: "LFP-BLE Consumed Ah"
id: "lfpble_consumed_ah"
type: CONSUMED_AH
filters:
- multiply: -1
- platform: victron_ble
victron_ble_id: LFPBLE
name: "LFP-BLE State of charge"
type: STATE_OF_CHARGE
device_class: battery
- platform: victron_ble
victron_ble_id: LFPBLE
name: "LFP-BLE Battery Power"
id: lfpble_battery_power
type: BATTERY_POWER
# SmartShunt
- platform: victron_ble
victron_ble_id: SMSHUNT
name: "SMSHUNT Battery voltage"
id: SMSHUNT_battery_voltage
type: BATTERY_VOLTAGE
- platform: victron_ble
victron_ble_id: SMSHUNT
name: "SMSHUNT Current"
accuracy_decimals: 1
type: BATTERY_CURRENT
filters:
- multiply: -1
- platform: victron_ble
victron_ble_id: SMSHUNT
name: "SMSHUNT Battery Power"
id: SMSHUNT_battery_power
type: BATTERY_POWER
filters:
- multiply: -1
- platform: template
name: "LFPCoKWh"
id: lfp_co_kwh
update_interval: 60s
state_class: measurement
unit_of_measurement: kWh
lambda: |-
return 0.05 * id(lfpble_consumed_ah).state;
- platform: total_daily_energy
name: "SMSHUNT Daily Energy"
power_id: "SMSHUNT_battery_power"
- platform: total_daily_energy
name: "SMSHUNT Daily Energy"
power_id: "SMSHUNT_battery_power"
# JBD Sensors
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
current:
name: " current"
power:
name: " power"
id: "jbd_bms_power"
charging_power:
name: " charging power"
discharging_power:
name: " discharging power"
state_of_charge:
name: " state of charge"
capacity_remaining:
name: " capacity remaining"
id: jbd_bms_capacity_remaining
battery_cycle_capacity:
name: " battery cycle capacity"
total_voltage:
name: " total voltage"
id: jbd_total_voltage
average_cell_voltage:
name: " average cell voltage"
delta_cell_voltage:
name: " delta cell voltage"
min_cell_voltage:
name: " min cell voltage"
max_cell_voltage:
name: " max cell voltage"
min_voltage_cell:
name: " min voltage cell"
max_voltage_cell:
name: " max voltage cell"
temperature_1:
name: " temperature 1"
- platform: template
name: " used capacity"
id: "jbd_bms_used_capacity"
update_interval: 30s
unit_of_measurement: AH
icon: "mdi:current-dc"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
return 173 - id(jbd_bms_capacity_remaining).state;
- platform: total_daily_energy
name: "Daily Energy"
power_id: "jbd_bms_power"
binary_sensor:
- platform: victron_ble
victron_ble_id: LFPBLE
name: "LFP Battery has Alarm"
type: ALARM
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
balancing:
name: " balancing"
charging:
name: " charging"
discharging:
name: " discharging"
text_sensor:
- platform: victron_ble
victron_ble_id: LFPBLE
name: "LFP Battery Alarm reason"
type: ALARM_REASON
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
errors:
name: " errors"
switch:
- platform: ble_client
ble_client_id: client0
name: " enable bluetooth connection"
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
charging:
name: " charging"
discharging:
name: " discharging"
- platform: restart
name: "VictronJBD BLE Restart"