I am using esphome with the ble_proxy functionality to pick-up measurements from my Xiaomi Miflora plant sensor and feed those into the Plant integration in HA for my plants.
I currently have to ESPs in my house and the plant was planned to be only picked up by one of them location-wise. This all works fine. But now I wanted to start moving the plants based on the weather (e.g. move them outdoors) and as a matter of fact the first ESP can’t pick the readings no longer up but the 2nd can.
So I tried to just copy resp. add the sensor config from the first ESP to the 2nd and it works and I get the readings in HA now form the 2nd ESP.
The config I use is:
encryption:
key: "xxx"
ota:
- platform: esphome
password: "xxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Bleproxy WZ Fallback Hotspot"
password: "xxxx"
captive_portal:
esp32_ble_tracker:
scan_parameters:
# We currently use the defaults to ensure Bluetooth
# can co-exist with WiFi In the future we may be able to
# enable the built-in coexistence logic in ESP-IDF
active: false
sensor:
- platform: xiaomi_hhccjcy01
mac_address: 5C:85:7E:13:76:06
temperature:
name: "Dipsys Temperature"
moisture:
name: "Dipsys Moisture"
illuminance:
name: "Dipsys Illuminance"
conductivity:
name: "Dipsys Conductivity"
battery_level:
name: "Dipsys Battery Level"
- platform: xiaomi_hhccjcy01
mac_address: 5C:85:7E:13:73:EA
temperature:
name: "Banana Temperature"
moisture:
name: "Banana Moisture"
illuminance:
name: "Banana Illuminance"
conductivity:
name: "Banana Conductivity"
battery_level:
name: "Banana Battery Level"
bluetooth_proxy:
active: true
But the problem is that they are now ofc kind of duplicate as the full names of the readings are “sensor.bleproxy_sz_banana_illuminance” (from the first ESP, no longer updated) and now “sensor.bleproxy_wz_banana_illuminance” (from the 2nd) but the “plant” device is configured to use the bleproxy_sz_* readings. Result: The plant device is not updated with new readings.
Is there a way I can map the readings from the 2 ESPs into one generic reading?
e.g. something along the line (fictive):
sensor:
plant_banana:
humidity:
- bleproxy_sz.banana_humidity
- bleproxy_wz.banana_humidity
and they get updated by whichever sensor sends the data and I could then map the “plant” to those unified readings?
Any help is greatly appreciated. Thanks