Tasmota & Xaomi BLE temp sensors

You can use esphome with Bluetooth proxy

###

esp32_ble_tracker:

bluetooth_proxy:

###

For simple passive ble devices is working well.

Protocol: mijia or bthome.

pvvx firmware

1 Like

Thanks, I tried that.
Unfortunately that has only capitalized the labels in the error message in the log.
Can you post part of your working config?

Cheers, I might try that when I have a bit more time.

It looks the same as my posted code snippet earlier in this thread, just modified for the new MQTT formatting.

Inside my configuration.yaml file:
mqtt: !include mqtt.yaml

Inside my mqtt.yaml file:

sensor:
    #Laundry Environmental Sensors
  - name: "Laundry Temperature"
    unique_id: sensor.laundry_temperature
    state_topic: "tele/tasmota_ble/ATC******"
    value_template: "{{ value_json.Temperature }}"
    device_class: temperature
    unit_of_measurement: "°F"
  - name: "Laundry Humidity"
    unique_id: sensor.laundry_humidity
    state_topic: "tele/tasmota_ble/ATC******"
    value_template: "{{ value_json.Humidity }}"
    device_class: humidity
    unit_of_measurement: "%"
    icon: mdi:water-percent
  - name: "Laundry DewPoint"
    unique_id: sensor.laundry_dewpoint
    state_topic: "tele/tasmota_ble/ATC******"
    value_template: "{{ value_json.DewPoint }}"
    unit_of_measurement: "°F"
  - name: "Laundry Battery"
    unique_id: sensor.laundry_battery
    state_topic: "tele/tasmota_ble/ATC******"
    value_template: "{{ value_json.Battery }}"
    device_class: battery
    unit_of_measurement: "%"
    icon: mdi:battery-outline

You took the time to redact all the ATC****** identifiers, but you also have them posted in the first part of your initial question post. Are you sure you have the correct ones listed in your YAML file? Since they’re public info now, it might just be easier to post the un-redacted info for ease in troubleshooting.

Can you listen to the MQTT topic in question, and post the output? The errors would indicate that there are no temperature or humidity attributes on that topic to assign to your created entities.

1 Like

@ IOT_Ninja - they don’t look too different from mine.
Also, D’Oh!

I just went with ESPhome as per @ nikito7’s suggestion.
I had to update my instance andget the Mi sensors updated to 3.8 for the BThome advertisements but they get automatically detected.

esp32_ble_tracker:

bluetooth_proxy:
  active: true

Seems to work OK even on Arduino as I couldn’t get ESPHome Bluetooth Proxy to work - I have a ESP32-C3.
I started with a basic install from Web - ESPHome and added from there.

This topic finally helped me get this working too. It’s painful that Tasmota’s HA Integration doesn’t work for Auto Discover :frowning:

1 Like

HA autodiscovery for Tasmota BLE devices still not working / sensors have to be manually created right? just double checking if this is still not fixed.

thx

What should be fixed in tasmota? Data is sent out from ble device. It’s HA implementation which doesn’t evaluate devices out of the MQTT message.

Correct. The issue is the HA integration not auto discovering BLE devices / having to manually create the devices. On my end I decided to use OMG for BLE devices as the integration provides auto discovery. Still would be nice to see the feature implemented for Tasmota/BLE.

But in that case it should be with HA team to enhance the implementation instead of requesting workarounds in the tasmota sourcecode? Other tasmota devices have a auto discovery function in the HA implementation.

Agreed. Orignal issues/requests date back to the setoption19 “on” discovery, prior to the Tasmota integration handling autodiscovery. If not already done I guess a feature/fix request needs to be opened with HA. I have moved BLE to OMG so not an issue for me.