flex-horseshoe-card icon indicating copy to clipboard operation
flex-horseshoe-card copied to clipboard

cards broken when no internet connection

Open studiowena opened this issue 1 year ago • 10 comments

Hi,

Can You change code to be independed from internet connection and work only from local files downloaded to HA?

i think this broke cards when have no internet connection

import {
  LitElement,
  html,
  css,
  svg
  } from "https://unpkg.com/[email protected]/lit-element.js?module";

please change it to work without internet connection

studiowena avatar Dec 05 '23 07:12 studiowena

I have the same problem, it's very disturbing. image

Dackara avatar Jan 20 '24 17:01 Dackara

+1 Did someone find a solution or an alternative to fix this issue ?

maxpilotevan avatar Apr 07 '24 07:04 maxpilotevan

seems there is a larger issue with this component - since the server https://unpkg.com is randomly unavailable from different parts of the world (I cannot see it from UAE, but it's perfectly accessible for me from hetzner and azure networks). This of course renders all my dashboards useless ATM...

debugging in chrome confirms it's the problem with access to the third party:

image

When trying to download it manually, it randomly shows cloudflare error after a long timeout or nothing at all...

gitmarecki avatar Apr 12 '24 11:04 gitmarecki

whats the problem to have this JS localy on our HA? It should be implemented at beginning... we have to change code to local destination of this script

studiowena avatar Apr 12 '24 12:04 studiowena

replacing the path inside /homeassistant/www/community/flex-horseshoe-card/flex-horseshoe-card.js file does not have any effect on existing installation... not sure how to reconfigure it to use this file once the card is already installed.

BTW. looks like the problem with availability of unpkg.com has been addressed and everything is back to normal again.

gitmarecki avatar Apr 12 '24 13:04 gitmarecki

replacing the path inside /homeassistant/www/community/flex-horseshoe-card/flex-horseshoe-card.js file does not have any effect on existing installation... not sure how to reconfigure it to use this file once the card is already installed.

BTW. looks like the problem with availability of unpkg.com has been addressed and everything is back to normal again.

there is more import in code in this unpkg... so author need to import all stuff or maybe he cant cuz of license of lib?

studiowena avatar Apr 13 '24 07:04 studiowena

Same problem here - hopefully it will be fixed (i.e. cards will become independent of an internet connection).

ytsopelas avatar May 16 '24 08:05 ytsopelas

+1. I love the horseshoe card but it goes against my principles with my HA installation that it should continue to work without internet. Would be great to get this fixed.

robotpandarocket avatar May 28 '24 20:05 robotpandarocket

i think the solution you all are looking for is described in this https://github.com/AmoebeLabs/flex-horseshoe-card/issues/88#issuecomment-2145334978 by @abu9

Simply download the LitElement and you are no longer dependent on the internet.

w0vka avatar Jul 05 '24 08:07 w0vka

i think the solution you all are looking for is described in this #88 (comment) by @abu9

Simply download the LitElement and you are no longer dependent on the internet.

Thank you w0vka!

ytsopelas avatar Jul 06 '24 22:07 ytsopelas