MiFlora Sensor Plant Database

Found the sollution.

Adding a plant sensor in you configuration.yaml you can combine them in 1 entity.

spathiphyllum_zolder: 
  sensors:
    moisture: sensor.spathiphyllum_zolder_moisture
    battery: sensor.spathiphyllum_zolder_battery
    temperature: sensor.spathiphyllum_zolder_temperature
    conductivity: sensor.spathiphyllum_zolder_conductivity
    brightness: sensor.spathiphyllum_zolder_light_intensity
  min_battery: 17

Thought I would share my config for the plant card. With this, you can swipe between the old plant view and the new custom card… hope someone finds this as useful as I have in tidying up my UI

cards:
  - entity: plant.herbs
    species: thymus camphoratus
    type: 'custom:flower-card'
  - entity: plant.herbs
    name: Herbs
    type: plant-status
parameters:
  scrollbar:
    draggable: true
    hide: false
    snapOnRelease: true
  spaceBetween: 8
type: 'custom:swipe-card'
2 Likes

Hello,
i’m new with home assistant.
Can someone host somewhere a working data.js?
I tried to create it but i got an "UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x81 in position 5215: character maps to " using the csv posted and i can’t procede.
Thanks

EDIT: i think the data.js posted somewhere here is good.
I have a problem with the display informations, i think the bars are not correct.
I use mqtt to grab the infos, with entities like “sensor.mi_flora_moisture” or “sensor.mi_flora_temperature” and made a group:

Plants:
view: yes
icon: mdi:flower
entities:
- group.peperoncini
peperoncini:
name: Peperoncini
entities:
- sensor.mi_flora_moisture
- sensor.mi_flora_conductivity
- sensor.mi_flora_temperature
- sensor.mi_flora_light
- sensor.mi_flora_battery
and the card with:
entity: group.peperoncini
species: capsicum favorit deep orange
type: ‘custom:flower-card’

I see images and name, but i think that the sensors are not compared against “this.stateObj.attributes.temperature” and the others in flower-card.js.
If someone can help, it’s really appreciated.
Thanks

EDIT2: i made it ( well, it seems a monologue lol )
i create this in configuration.yaml :
plant:
peperoncino:
sensors:
moisture: sensor.mi_flora_moisture
battery: sensor.mi_flora_battery
temperature: sensor.mi_flora_temperature
conductivity: sensor.mi_flora_conductivity
brightness: sensor.mi_flora_light

and in the card this data:

entity: plant.peperoncino
species: capsicum favorit deep orange
type: ‘custom:flower-card’

now i can see the right bars length.
Hope it can help someone.

Hi, can you please paste our code in the correct format, otherwise, we can’t help…

  1. Paste the code
  2. Highlight the code
  3. press the </> button in the tool bar…

In terms of hosting the db… not sure this will happen as the origins of the data are… well… lets just say that no-one is going to make available someone else’s work (that they charge for via the product) for free… essentially, as an owner of a product (the sensor) you have access to the data and can therefore use this for your own purposes… but hositng it and making it available online is aother story…

How did you manage that the bottom plant card does not show it’s name above the sensor data?

I don’t understand your question, but here’s my lovelace configuration.

  - title:  Pflanzen
    id: plant
    icon: mdi:flower
    cards:
      - type: custom:vertical-stack-in-card
        cards:
          - type: custom:flower-card
            entity: plant.palme
            species: "trachycarpus fortunei"
          - type: glance
            entities:
              - sensor.mqtt_palme_moisture
              - sensor.average_palme_temperature
              - sensor.mqtt_palme_conductivity
              - sensor.average_palme_brightness
              - sensor.mqtt_palme_battery

      - type: custom:vertical-stack-in-card
        cards:
          - type: custom:flower-card
            entity: plant.lorbeer
            species: "laurus nobilis"
          - type: glance
            entities:
              - sensor.mqtt_lorbeer_moisture
              - sensor.average_lorbeer_temperature
              - sensor.mqtt_lorbeer_conductivity
              - sensor.average_lorbeer_brightness
              - sensor.mqtt_lorbeer_battery
2 Likes

Ahhhh you used a glance card and gave it no title. I used the lovelace plant card and if you put it into a vertical stack ist looks like this. I wanted to remove the title “Goldfruchtpalme”:

image

I have the same the issue with HASS 0.99.3
My Lovelace config:

- url: /community_plugin/lovelace-flower-card/flower-card.js
  type: module

Also I’ve check data.js file, format is correct. But the log show:
" …local/lovelace-flower-card/data/data.js:1:1 Uncaught SyntaxError: Invalid or unexpected token"

Are there any solution ?

Check the js, because at 99% there is something there that is not correct…

I have just made another post about Miflora and then found this thread. I was wondering if anyone could help.

I was going to go down the route of an esp32 to get information from my plant sensors and transmit via MQTT to HA. I thought as I could not find Xaiomi sensors I would buy Vegtrug ones. These sensors are recognised by the Xaiomi flower care app so thought I would be ok but my miflora sensor and card only picks up battery information?

Anyone know if I use this flora/flora at master · sidddy/flora · GitHub or any of the tools on here I could get the information from my sensors into HA somehow?

link to my original question thread too, sorry:

have you tried plantgateway? https://github.com/ChristianKuehnel/plantgateway

Status: in principle solved

Does the lovelace-flower-card still work for you all (Home Assistant Core 0.106.x series)?

Whatever I do I can’t get it to work…no clue how to debug this one… any help is appreciated.

  • I’m using Plantgateway to populate data from the
    various plantsensors via the Mosquitto broker (Hassio Addon) to HA. Working flawlessly.
  • Added the following to ui-lovelace.yaml
  - type: module
    url: /community_plugin/lovelace-card-tools/card-tools.js
  - type: module
    url: /local/lovelace-flower-card/flower-card.js

and

    cards:
      - cards:
          - entity: plant.spathiphyllum
            species: spathiphyllum 'bingo cupido'
            type: 'custom:flower-card'
          - entities:
              - sensor.spathiphyllum_moisture
              - sensor.spathiphyllum_temperature
              - sensor.spathiphyllum_conductivity
              - sensor.spathiphyllum_brightness
              - sensor.spathiphyllum_battery
            type: glance
        type: 'custom:vertical-stack-in-card'
  • I have the following file data structure within the www folder:
    image
    data.js is created based on the command

python3 convert.py PlantDB_5335_U0.csv > data.js

  • This is the output in HA (only the entities are shown not the flower-card):
    image

Not quite what I expected versus what I thought I would get such as:
2019-06-29 11_33_47-Home Assistant

Resolved
Well, that was utter unclear… the following is a prerequisite → Plant Monitor - Home Assistant

ui-lovelace.yaml

    cards:
      - entity: plant.dieffenbachia_maculata
        species: dieffenbachia maculata
        type: 'custom:flower-card'
      - entity: plant.spathiphyllum_bingo_cupido
        species: spathiphyllum 'bingo cupido'
        type: 'custom:flower-card'
      - entity: plant.howea_forsteriana
        species: howea forsteriana
        type: 'custom:flower-card'
      - entity: plant.dypsis_lutescens
        species: dypsis lutescens
        type: 'custom:flower-card'
      - entity: plant.pachira_macrocarpa
        species: pachira macrocarpa
        type: 'custom:flower-card'

configuration.yaml

plant: !include plants.yaml

plants.yaml

dieffenbachia_maculata:
  sensors:
    moisture: sensor.dieffenbachia_camilla_moisture
    battery: sensor.dieffenbachia_camilla_battery
    temperature: sensor.dieffenbachia_camilla_temperature
    conductivity: sensor.dieffenbachia_camilla_conductivity
    brightness: sensor.dieffenbachia_camilla_brightness

dypsis_lutescens:
  sensors:
    moisture: sensor.areca_dypsis_lutescens_moisture
    battery: sensor.areca_dypsis_lutescens_battery
    temperature: sensor.areca_dypsis_lutescens_temperature
    conductivity: sensor.areca_dypsis_lutescens_conductivity
    brightness: sensor.areca_dypsis_lutescens_brightness

howea_forsteriana:
  sensors:
    moisture: sensor.howea_forsteriana_moisture
    battery: sensor.howea_forsteriana_battery
    temperature: sensor.howea_forsteriana_temperature
    conductivity: sensor.howea_forsteriana_conductivity
    brightness: sensor.howea_forsteriana_brightness

pachira_macrocarpa:
  sensors:
    moisture: sensor.pachira_aquatica_moisture
    battery: sensor.pachira_aquatica_battery
    temperature: sensor.pachira_aquatica_temperature
    conductivity: sensor.pachira_aquatica_conductivity
    brightness: sensor.pachira_aquatica_brightness

spathiphyllum_bingo_cupido:
  sensors:
    moisture: sensor.spathiphyllum_moisture
    battery: sensor.spathiphyllum_battery
    temperature: sensor.spathiphyllum_temperature
    conductivity: sensor.spathiphyllum_conductivity
    brightness: sensor.spathiphyllum_brightness

Almost there. Result with pop-up:
image

Update 3 April 2020
Sorry folks I completely forgot to update this post due to Corona/Covid. I concluded - based on the issue history - that the original author wasn’t really available anymore for additional changes to his card. So I looked into several github forks of this particular card. Some forks were very interesting and therefore I edited those changes back into my own forked card of the original card.

The above screenshot with the popup is the result of the slicing and dicing of several pieces of code. Credits to them.

You can find my fork of this card at:

3 Likes

@rlems Great! How did you get the pop-up?

hey @jones can you share your data.js file again the previous link has expire i have no idea how to use python thank you in advance

Sure. data.js + images… here you go. Link is valid for 7 days: https://send.firefox.com/download/f860f70057d4dca4/#h5lY7rztXoNwIl-_ZK3hrg

it says link has expired

Guess firefox send is not the best solution to publicly provide files. I’ll send you a link as DM.

I like it too please :wink:
@jones

https://send.firefox.com/download/aa4de0c80f4e01d0/#mr-x_0oFDqBxndVcHMR7RQ

1 Like

Thank you for shareing