Polling multiple MiFlora modules with multiple ESP32 Modules

Here’s a simplified version of what I’m trying solve:

Let’s say I have a single MiFlora module set with a houseplant.

My wife likes to move the houseplant around the house, beyond the range of a single esp32 device (polled via esphome). I have placed an ESP32 on each floor to accommodate for this.

So I now have at least one of the ESP32s that can read the MiFlora device, but I also have 3 separate sensors for that MiFlora device - one for each of the ESP32 devices.

Am I missing some easy way to address this? If not, I’m thinking that I’ll go with a Template sensor and take a max value (or some variation).

Thanks!

Yeas, each ESP will create a sensor, so you will have to combine them with a template sensor. Using the max value is one way if you use the float filter on the sensors, as this will return the unavailable state as 0.

So:

value_template: "{{ [states('sensor.esp1') | float, states('sensor.esp2') | float, states('sensor.esp3') | float] | max }}"
2 Likes

Thank you, @tom_l.

I had tried the Max value without the float, found it didn’t work, came back here and the working solution was waiting.

Thanks much!

1 Like