Are anybody else having issues with the card not showing up after latest upgrade? It looks like I have completed everything correctly, but the card is just empty, when I add a custom card manually…
It seems as if quotes in the plant’s species:
doesn’t work anymore. So open the data file, then search for your plants, and remove ' '
characters from the first instance (before the square brackets).
My set-up:
- modified
flower-card.js
to point to correct folders: https://github.com/tbrasser/lovelace-flower-card - used
convert.py
on the database file - removed the
'
characters from the name of the plants that I have indata.js
. (only on the first occurrence, before the[ ]
part. - put both
flower-card.js
anddata.js
in/config/www/community/flower-card/
- put plant images in
/config/www/images/plants/
(also modify these filenames to remove the'
) - add resource from the ui:
/hacsfiles/flower-card/flower-card.js (js module)
I used the following code in lovelace (styling because I use HKI):
- entity: plant.miflora1
species: dracaena fragrans massangeana
type: custom:flower-card
style: |
ha-card {
border-radius: {{ states('input_select.border_radius_selector') }};
box-shadow: var(--box-shadow);
font-family: Helvetica;
font-size: 12px;
opacity: 0.8;
}
- type: custom:flower-card
entity: plant.miflora2
species: dracaena marginata
style: |
ha-card {
border-radius: {{ states('input_select.border_radius_selector') }};
box-shadow: var(--box-shadow);
font-family: Helvetica;
font-size: 12px;
opacity: 0.8;
}
Result:
p.s. yes, my so is in charge of naming plants
p.p.s you can find the database and images in this thread, and also in the README of the repo’s linked.
Really liking this card! Has anyone successfully used their own images? Struggling to get the correct sizing.
I have tried several times to convert the file but I am unable to. Could an already converted data.js be uploaded directly to the repo?
python3 convert.py PlantDB_5335_U0.csv > data.js
I would really need data from a plant. For data as in the table. Name of the plant: Jiaogulan, Gynostemma pentaphyllum. LUX MIN LUX MAX TEMPERATURE MIN TEMPERATURE MAX. Thanks !!!
Don’t know about the uploading to the repo but i’ve just converted the CSV by changing the line
with open(filename') as csvfile:
to
with open(filename, encoding='UTF8') as csvfile:
in convert.py, someone feel free to make this a pull on github, i don’t have an account there.
Anyway, I also have a non expiring link on my own file storage for those of you who don’t care to convert it yourselves.
CARD
type: 'custom:flower-card'
entity: plant.sempervivum
species: sempervivum tectorum
CONFIG
plant:
Sempervivum:
sensors:
moisture: sensor.flower_white_m
temperature: sensor.flower_white_t
conductivity: sensor.flower_white_c
brightness: sensor.flower_white_l
Why does the card display no image
browser cache needed clearing.
I’m trying to set this card up and installed this version in HACS but am getting the below error., even after a hard cache refresh
Which version / fork of the card are people using?
Just tried this version as well. This time I looked in the Chrome dev console and saw this:
I’m using the original repo but without HACS.
folder structure as follows
CONFIG/WWW:.
| card-tools.js
| flower-card.js
└───lovelace-flower-card
└───data
data.js <--- converted file from earlier post
└───Images
Lovelace resources loaded from GUI with paths /local/card-tools.js and /local/flower-card.js
edit: Come to think of it, I did restart my HA instance completely.
edit 2: I’ve now switched to the repo from post 85 MiFlora Sensor Plant Database and that also seems fine.
Hi guys,
I created free cloud Plants DB which can be used by community. Please take a look.
I think I found the problem, since I was stuck where you were. In the .js file, is always making reference to /local/lovelace-flower-card/data/data.js
I you install everything via hacs, you need to change the local references to /hacsfiles/lovelace-flower-card/data/data.js
To do this You need to edit the flower-card.js file.
Change line 163 to: <span id="name"> ${this.stateObj.attributes.friendly_name}</span>
Save the file and most probably refresh your browser’s cache.
Hi all,
Just forked this repo, made it installable with HACS, removed the hassle of installing dependencies and removed the step with running convert.py
.
Here it is: https://github.com/Yolandavdvegt/lovelace-flower-card
You could also have a look at this project: Cloud Plant DB with API for PlantCard where we are trying to get rid of the whole issue with the plant db by creating an open API to fetch the data. We also add the information about max/min values to the plant component itself, instead of each card having to read and parse the whole db.
@yvdv, thx a lot for your great job!
Can you also consider adding a name:
property ?
One last question: which is supposed to be the best image size for plants ?
Simone
You can take a look at my current implementation here .
Code as follow:
type: 'custom:stack-in-card'
cards:
- type: 'custom:flower-card'
entity: plant.pilea_peperomioides_salotto
species: pilea peperomioides
- type: plant-status
entity: plant.pilea_peperomioides_salotto
name: ' '
To make it perfect:
- swap humidity and temperature to get the same order as plant-status card
- allow an option to select between current icon set and plant-status card icon set
- allow to personalize the title of the card with a customizable
name:
Simone
It works perfectly for me, kudos!
Did anybody face the issue with sizing ?
Any changes to .js required ?
Data from openplantbook
image in /lmages/plants/
openplantbook:
client_id: !secret plantbook_client_id
secret: !secret plantbook_secret
Flower1:
species: zamioculcas zamiifolia
sensors:
moisture: sensor.flower_1_moisture
battery: sensor.flower_1_battery
temperature: sensor.flower_1_temperature
conductivity: sensor.flower_1_conductivity
brightness: sensor.flower_1_light_intensity
Hi there,
For me, the card shows up “perfectly” but I can’t manage to get the popups.
Any idea of what could I be doing wrong?
Thanks