Multiple xiaomi flower redundancy

Hi all,

I have many plants around the house tracked with mi Flora sensors.

I have setup a single yaml file (with different name as gateway1 gateway2 etc ) with the details of every flower sensor
Issue is that if the same plant is tracked from 2 gateway it creates 2 different sensor (plant and plant_2).

There is a way to avoid it? It would be great so I can move plants around the house without changing yaml in gateway.

1 Like

Hi,

In your topic definition what about replacing the gateway name by a ‘+’. In mqtt the + means whatever word and is considered as the single level wildcard.

so change name from gateway1 to gateway+, right?

just replace gateway1 by the +

sensor:
  - platform: mqtt
    name: "SonoffBridge values"
    value_template: "{{ value_json.value }}"
    state_topic: "home/+/SRFBtoMQTT"
    json_attributes: 
      - "raw"
      - "value"
      - "delay"
      - "val_Thigh"
      - "val_Tlow"
    qos: 1

with the example above you will receive payloads from home/gateway/SRFBtoMQTT and home/gateway1/SRFBtoMQTT

But I’m using esphome here so sensor are auto discovered.

uhm

maybe I can create a custom min max sensor for plant and plant_2 values with last mode to avoid this?

Ok I created 2 different version for every gateway (gateway 1 and 2) and added different name for scouting same xiaomi flowers sensors:

Gateway1

sensor:

  • platform: xiaomi_miflora
    mac_address: 94:2B:FF:5C:91:61
    temperature:
    name: “Xiaomi MiFlora Temperature_1”
    moisture:
    name: “Xiaomi MiFlora Moisture_1”
    illuminance:
    name: “Xiaomi MiFlora Illuminance_1”
    conductivity:
    name: “Xiaomi MiFlora Soil Conductivity_1”

Gateway2

sensor:

  • platform: xiaomi_miflora
    mac_address: 94:2B:FF:5C:91:61
    temperature:
    name: “Xiaomi MiFlora Temperature_2”
    moisture:
    name: “Xiaomi MiFlora Moisture_2”
    illuminance:
    name: “Xiaomi MiFlora Illuminance_2”
    conductivity:
    name: “Xiaomi MiFlora Soil Conductivity_2”

But the problem persist.

If I add both gateways all sensor are available only in the last added while the first one remains without any sensor.

@OttoWinter do you think is an issue on esphome or an error in my config?

FYI issue is present in latest version but fixed in dev.

Do you know when this fix will make its way into the latest version? I’ve still got the same issue