Error with custom lovelace card (MiFlora Flower Card by thomasloven)

I think I may have found a solution.
I noticed that my data.js wasn’t loading, thus we get this error.

In flower-card.js the location is hardcoded:

import {FlowerData} from '/local/lovelace-flower-card/data/data.js';

So I’ve changed it to point to the location I’ve installed it:

import {FlowerData} from '/local/community/lovelace-flower-card/data/data.js';

The image source should also be changed.

<img src="/local/community/lovelace-flower-card/data/images/${this.config.species}.jpg">

OR you simply install everything in /local/lovelace-flower-card/

This is my resources entry:

- url: /local/community/lovelace-flower-card/flower-card.js
  type: module
- url: /local/community/lovelace-card-tools/card-tools.js
  type: module

Hope it helps?

1 Like