/ August 21, 2018/ Articles, Home Assistant, Xiaomi/ 3 comments

With the following code Xiaomi Mi Flora is added in Home Assistant via Docker and added with a nice LoveLace gui.

Be sure that you run Home Assistant in –net=host (docker) or network_mode: host (docker-compose) if running in docker. Needed for bluetooth access.

Home Assistant configuration:

      moisture: sensor.miflora_plantname_moisture
      battery: sensor.miflora_plantname_battery
      temperature: sensor.miflora_plantname_temperature
      conductivity: sensor.miflora_plantname_conductivity
      brightness: sensor.miflora_plantname_light_intensity
    min_moisture: 8
    max_moisture: 150
    min_battery: 10
    min_conductivity: 50
    max_conductivity: 2000
    min_temperature: 0
    max_temperature: 40

- platform: miflora
    name: MiFlora Plantname
    mac: 'xx:xx:xx:xx:xx:xx'

and the LoveLace:

        - type: picture-elements
          image: /local/cards/plants.jpg
            - type: state-badge
              entity:  sensor.miflora_plantname_moisture
                top: 27%
                left: 10%
                --ha-label-badge-font-size: 1em
                color: rgb(255, 255, 255)
            - type: state-badge
              entity: sensor.miflora_plantname_light_intensity
                top: 27%
                left: 25%
                --ha-label-badge-font-size: 1em
                color: rgb(255, 255, 255)
            - type: state-badge
              entity: sensor.miflora_plantname_conductivity
                top: 27%
                left: 40%
                --ha-label-badge-font-size: 1em
                color: rgb(255, 255, 255)
            - type: state-label
              entity: sensor.miflora_plantname_temperature
                top: 15%
                left: 92%
                --ha-label-badge-font-size: 1em
                color: rgb(255, 255, 255)

Custom card based on example from here. It is changed with color white font so that a white theme will not make text invisible.

download plant image here.

Edit: in the meantime, i abandoned using the miflora component. Many times the bluetooth stack was unstable in home assistant and because i wanted to use home assistant docker without network_mode:host i wasn’t able to forward the Bluetooth adapter.

Share this Post


  1. Good day! This is my first visit to your blog! We are a team of volunteers and starting a new project in a community in the same
    niche. Your blog provided us useful information to work on. You have
    done a outstanding job!

  2. Admiring the hard work you put into your blog and in depth information you provide.
    It’s great to come across a blog every once
    in a while that isn’t the same unwanted rehashed
    material. Fantastic read! I’ve saved your site
    and I’m including your RSS feeds to my Google account.

  3. Woah! I’m really loving the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s challenging
    to get that “perfect balance” between usability and appearance.
    I must say that you’ve done a awesome job with this.
    Also, the blog loads extremely fast for me on Chrome.
    Exceptional Blog!

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>