Plant entity: Unavailable values with esphome

Hi experts, i need your help!

I’m currently using esphome and an ESP32 to monitor the plant-sensor from Xiaomi (MiFlora).

My esphome config looks like documented here:

To support the plant-UI, i have the following mapping in the config:

      moisture: sensor.flower1_moisture
      temperature: sensor.flower1_temperature
      conductivity: sensor.flower1_soil_conductivity
      brightness: sensor.flower1_illuminance
    min_moisture: 20

This setup leads to the following Issue:
Every time the ESP reports new values to home-assist and the value-set does not contain new values for each of my five sensors, some of my sensors switch to “Unavailable”, until they eventually report new values.

The UI then looks like this:

Is there any option/workaround to use the last-valid value to display?
I could not find any solution yet.

Thanks for your help!

Did you ever find a fix for this?

I have just implemented ESPHome with remote BLE Bridges instead of MQTT and am getting the same issue

Keen to know if anyone else is experiencing the same issue and has a fix. The Plant entity use to work like a charm through MQTT but is not reliable anymore with the ESP32 BLE proxy and Xiaomi BLE integration.

Any hint or ideas apreciated!

I am not familiar with Xiaomi Mijia BLE Sensors, but if the esp is handling the sensor component, try “force_update: True” otherwise values won’t update if they haven’t changed, which can cause the unavailable status if values aren’t updated in a while.