Coder Social home page Coder Social logo

lovelace-auto-reload-card's Introduction

hacs_badge

auto-reload-card

Custom Lovelace card to use in Home assistant allowing lovelace to auto reload every X minutes.

When running on wall tablet, it often happens that lovelace websocket disconnect and the entities are not refreshed automatically anymore.
This card, can be used to workaround this problem.
Hopefully, one day, this card will be deprecated and a real fix will be available.

Installation

Use HACS or follow this guide

resources:
  url: /local/auto-reload-card.js
  type: module

Configuration example:

  • Refresh lovelace every 1 minute:
type: 'custom:auto-reload-card'
delay_in_minute: 1

lovelace-auto-reload-card's People

Contributors

ben8p avatar corporategoth avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

lovelace-auto-reload-card's Issues

Uncaught TypeError: Cannot read properties of null

2023-05-04 08:35:28.866 ERROR (MainThread) [frontend.js.latest.202304111] https://10.0.0.10:8123/hacsfiles/lovelace-auto-reload-card/auto-reload-card.js?hacstag=321140869961031:24:30 Uncaught TypeError: Cannot read properties of null (reading 'classList')

Recently updated to 2023.4.6 and latest lovelace-auto-reload-card, started getting the above error.

Error with HA 2023.04

This card was working fine for me until 2023.04. I have tried the fix mentioned in another issue, but that did not seem to help.

The error in HA is as follows:
http://10.0.30.22:8123/hacsfiles/lovelace-auto-reload-card/auto-reload-card.js?hacstag=321140869961031:24:29 TypeError: null is not an object (evaluating 'header.classList')

Does anyone have any hints here?

How to enable after installation?

Hello,

I'm happy seeing this, as i'm affected by the refresh problems using two wallmounted tablets at my home. Thank you for this usefull tool.

I'm sorry for this beginner question, but i can't find the needed info anywhere.

I just installed this using HACS. That wen't fine. I can see it in the repository.
But i can't find, how do i edit/enable it.

Can you help me please?

Location of HASS's www directory

I'm trying to follow this direction:

If www/ doesn't exist, you should create it and then restart Home Assistant.

Note: If you're comfortable with git, the easiest way to do this is to just navigate to www/ and run

`git clone https://github.com/thomasloven/lovelace-card-mod`

from this page and when I go to /snap/home-assistant-snap/current/config there is no www folder.

I'm uncertain if this is due to it being somewhere else that I can't find, or if it needs to be created.

Which is it? And if it's the former, where is it? Thanks in advance.

Issue in HA app

This card seems to work perfectly on the web interface, but when I access HA via the official app on Android devices, I see a red error card with the message:

Custom element doesn't exist: auto-reload-card.
type: 'custom:auto-reload-card'
delay_in_minute:360

Unrelated question that I don't think warrants its own issue: is there any way that instead of assigning a period between reloads, I could instead assign a time (preferably in 24hr time)?

Unsure where to place the config

Hello, I have installed through HACS but I am not sure where this configuration is supposed to go:
"type: 'custom:auto-reload-card'
delay_in_minute: 1

Does it go into my config.yaml file or in the lovelace dashboard raw config? Here is my current lovelace dashboard raw config:

title: 11 Court Ln
resources:

  • url: /hacsfiles/kiosk-mode/kiosk-mode.js
    type: module
  • url: /hacsfiles/lovelace-auto-reload-card/auto-reload-card.js
    type: module
    "type: 'custom:auto-reload-card'
    delay_in_minute: 1
    kiosk_mode:
    hide_header: true
    views:
  • type: sidebar
    title: Cameras
    path: cameras
    badges: []
    cards:

Reload to a different link?

I'd love a feature add if you can: I'd love it if I could put your card in my sub views to automatically return them to the main view. Is that a thing that could be done? Like... Reload after 5 minutes to X

Device exclusion

Can you make it possible to exclude devices because it keeps reloading my screen when I'm editing and I only need it for my wall mounted tablet

Error with HA 2022.03 update

Started getting the following error after updating to the March HA build.

2022-03-03 18:08:05 ERROR (MainThread) [frontend.js.latest.202203010] https://homeassistant.lan:/hacsfiles/lovelace-auto-reload-card/auto-reload-card.js:29:32 Uncaught TypeError: Cannot read properties of null (reading 'querySelector')

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.