GithubHelp home page GithubHelp logo

gadgetchnnel / lovelace-card-preloader Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 3.0 98 KB

Allows preloading of Lovelace cards as a work around for changes in Home Assistant 0.107

JavaScript 100.00%

lovelace-card-preloader's People

Contributors

1dontex1st avatar dependabot[bot] avatar gadgetchnnel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lovelace-card-preloader's Issues

HA Cast support

Hi!
I'm observing that the effect of this plugin doesn't work on the HA panel when rendered on my Nest Display Max (using HA Cast). I think you reproduce the problem even using a common Chromecast. In the Cast environment there are some restrictions that the plugin has to respect. Thanks.

ReferenceError: console_error is not defined

Bit of an odd one this, just updated to version 0.107.7 of Home Assistant. Found out that this add-on is required to fix many of the UI bugs that have been introduced. Unfortunately I am seeing the following error in my console from this module:

ReferenceError: console_error is not defined

It is causing my Lovelave UI to go completely blank. Seems to happen across all browsers too. Any ideas what might be causing this?

this.console_error is not a function

I am getting this error in Chrome dekstop on the latest 0.0.4

lovelace-card-preloader.js:1 Uncaught (in promise) TypeError: this.console_error is not a function
    at console.window.console.error (lovelace-card-preloader.js:1)
    at l (chunk.8b29f0c82629b54e915d.js:12852)
    at Object.Kt [as createCardElement] (chunk.8b29f0c82629b54e915d.js:12311)
    at Object.preloadElement (lovelace-card-preloader.js:1)
    at lovelace-card-preloader.js:1
    at Array.forEach (<anonymous>)
    at lovelace-card-preloader.js:1

Will this work on android HA app too?

Sorry it's not really an issue, but didn't know where else to ask. I'm also not sure if I understand what this actually does, but here goes:

Since some time ago, when I open HA it shows w/e was on screen when I closed it, then it flashes and starts loading the actual cards entity by entity / row by row. If I'm on slow network it's really jarring and you can't click on anything because by the time you click there'll be another row loaded where you tapped.

Is my understanding of your mod correct in assuming using it I would see empty screen until all rows of card would be preloaded at which point the full card would be displayed instead seeing the entities pop in one by one / row by row ?

Please ignore/delete this if I misunderstood the function.

Cool idea but nothing changed for me

Hi! Great work doing this. Saw a lot of people complaining about the lazy-load feature after 0.107.* upgrade. Thanks for everything! Still not working for me though. I have no custom cards, just a vertical stack with two conditionals that used to work before upgrading to 0.107.7. Right now, everything works as expected after a refresh. If i switch the condition, the other conditional card does not appear, until i press the configure ui button at the top. After that works as expected.

So I found this preloader, installed it using HACS, added to resources by pressing the buttons on the notification pop-ups. Added everything in my mind, trying to make it work in raw configuration editor before anything else:

preload:
  - vertical-stack
  - horizontal-stack
  - entities
  - entity
  - entity-button
  - conditional
  - picture-elements
  - picture-entity

Looking in the console, everything seems fine( i know the 'preload:' is deprecated), it shows that all the types are preloaded, no errors at all. Still nothing changes in the behaviour of my setup. Any idea?

cards:
  - card:
      elements:
        - entity: switch.bar_lights
          icon: 'mdi:lightbulb'
          style:
            left: 63%
            top: 30%
          tap_action:
            action: toggle
          type: state-icon
      image: /local/images/Smarthome-parter-alloff.png
      type: picture-elements
    conditions:
      - entity: switch.bar_lights
        state: 'off'
    type: conditional
  - card:
      elements:
        - entity: switch.bar_lights
          icon: 'mdi:lightbulb'
          style:
            left: 63%
            top: 30%
          tap_action:
            action: toggle
          type: state-icon
      image: /local/images/Smarthome-parter-bar.png
      type: picture-elements
    conditions:
      - entity: switch.bar_lights
        state: 'on'
    type: conditional
type: vertical-stack

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.