thomasloven / lovelace-flower-card

102 stars 37 forks source link

miflora #7

Open mclaudiopt opened 5 years ago

mclaudiopt commented 5 years ago

hello is this card compatible with data comming from mi flora?

i have my sensor like this:

mclaudiopt commented 5 years ago

hi there can someone please help me setting up my card? i would appreciate

sn3ak commented 5 years ago

Don't create multiple issues for the same problem. You're just going to annoy people and not get help.

This is a BETA component. As such things will change, so the author most likely will not give you step by step instructions. You are expected to be knowledgeable in using custom components.

This requires a plant monitor, not a miflora sensor. Create one from your miflora sensors

Plant monitor

Feed that into this component and you should be closer to having it work.

mclaudiopt commented 5 years ago

Hello you are completly right. i apologize for the postings ! regarding the rest i already setupped the plant monitor the problem that i have now is that i added this code:

image

my plant is correctly settupped : image

may the problem be related to the fact that i did not made the conversion of the db ? i dont have a way to make it so i would kindly request if someone can post me the converted file for "ficus benjamina". the values for this plant are:

min_moisture: 20
max_moisture: 60
min_battery: 15
min_temperature: 8
max_temperature: 32
min_conductivity: 350
max_conductivity: 2000
min_brightness: 2500
max_brightness: 35000

thanks a lot for the help. i would like to contribute to other users also

mclaudiopt commented 5 years ago

note: the custom component is installed like this:

i installed via HACS

sn3ak commented 5 years ago

I won't share a database due to not knowing the legality of doing so. Your home assistant device has python, and is what I used to convert the database.

That said, here's the database entry you are requesting. I don't currently have the means to test it, but based on my database it should be accurate.

data.js:

'use strict';
const FlowerData =
{"ficus benjamina": ["Ficus benjamina", "ficus benjamina", "2500", "35000", "8", "32", "20", "60", "350", "2000"]}
;
export {FlowerData};
mclaudiopt commented 5 years ago

thanks a lot. will try

mclaudiopt commented 5 years ago

thanks a lot ...really something is not working but cannot understand what. where all my config: image

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

image

image

image

sn3ak commented 5 years ago

/community_plugin/lovelace-flower-card/flower-card.js

X:\www\community\lovelace-flower-card X:\www\community\lovelace-flower-card\data.js

I don't know anything about HACS yet, but to me those three things do not agree where your files exist. If I misread and you aren't using HACS, but added those files manually this still applies. Either change the /community_plugin/ references to /community/ or vice versa. With HACS you will want to match the

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

to wherever it downloaded the files automatically.

Here's where you need to use your browser's developer tools. Use Chrome / Firefox (maybe IE,etc) hit F12, go to network. reload your flower page, look at network, does the flower-card.js and other entries appear? do they say 200 for status? or 404?

sn3ak commented 5 years ago

Actually, before you change things, look in your homeassistant log and see if it is giving any errors, if so please post anything that applies to the flower card

Moonbase59 commented 4 years ago

@mclaudiopt Is it possible that you manually installed it into the "community" folder? I don’t have this in HACS. If you manually install it, it (currently) must be in www/lovelace-flower-card, because flower-card.js has a hard-coded:

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

It also requires card-tools, which I installed using HACS.