Olen / homeassistant-plant

Alternative Plant component of home assistant
365 stars 25 forks source link

Plant icon with internet blocked #186

Closed surfingbytes closed 3 months ago

surfingbytes commented 3 months ago

Currently, the image of plant is just a link to Open Plantbook. That means, if you add this entity to dashboard (for example via the flower card), and display that dashboard on device without internet access, the picture doesn't show up. Could this component (on configuration change) please download the picture/icon instead of having just link? Then the plants could be properly displayed even on wall tablets with blocked internet (LAN access only).

Olen commented 3 months ago

The component would still need access to the internet to download the images. You can set the option to download images automatically in the config of the openplantbook-integration.

surfingbytes commented 3 months ago

Yes, it would still need access to internet, which it has - the component runs on HA server, which has internet access. But then, you can display it on devices which has only local access - only to HA server, not to outside internet. Anyway, I had no idea this could be configured in openplantbook. Thank you 👍

surfingbytes commented 3 months ago

I just tried it. Configured OpenPlantbook integration to save images. Then I went to this Plant integration, updated one of my plants, checked "Force refresh from Open Plantbook", and the image url stayed as https://opb-img.plantbook.io/zamioculcas%20zamiifolia.jpg . Shouldn't it update to relative url, to be loaded from the saved ha image? Right now, it looks like it's still going out for it..

Olen commented 3 months ago

It will not override an existing configuration. It has no idea if the already configured url is set on purpose. So you need to remove the existing url and force the reload for it to add a new local url.

surfingbytes commented 3 months ago

I can confirm this works. Thank you.