Comments (8)
Can you add your card configuration and any errors in the dev console (F12)
from air-visual-card.
@Swampen it's likely that me and @digidestination have the same issue
i recently updated ha and all the extensions including this one, under Overview -> Home i can see all the cards when i refresh the page, but while browsing around ha, the next time i get to Overview there are no cards at all..
dev tools shows this as the only error in lovelance:
air-visual-card.js?hacstag=157674859200:426 Uncaught TypeError: Cannot read properties of undefined (reading 'attributes')
at HTMLElement.set hass [as hass] (air-visual-card.js?hacstag=157674859209:426)
at HTMLElement.value (hui-masonry-view.ts:44)
at HTMLElement.value (hui-masonry-view.ts:44)
at HTMLElement.t.addEventListener.once (hui-masonry-view.ts:44)
at i (typography.js:181)
at ha-logbook.ts:28
which points to this line: https://github.com/dnguyen800/air-visual-card/blob/master/dist/air-visual-card.js#L426
and my card's config is:
type: custom:vertical-stack-in-card
title: Air Quality
cards:
- type: custom:air-visual-card
air_pollution_level: sensor.u_s_air_pollution_level_2
air_quality_index: sensor.u_s_air_quality_index_2
main_pollutant: sensor.u_s_main_pollutant_2
city: Bucharest
hide_title: true
hide_weather: true
this error makes no sense to me though, as i don't set the weather
property:
https://github.com/dnguyen800/air-visual-card/blob/master/dist/air-visual-card.js#L256
which means that weatherEntity
should be ''
, so this should be falsey:
https://github.com/dnguyen800/air-visual-card/blob/master/dist/air-visual-card.js#L425
and thus the code should never reach the 426th line which is where the error is from
from air-visual-card.
@Swampen huh, i logged weatherEntity
at the 426th line, and it's showing weather.home
.. but I have no such entity.. and i never set weather
in the card config or configuration.yaml...
from air-visual-card.
a few more tests i did:
- commenting out these lines: https://github.com/dnguyen800/air-visual-card/blob/master/dist/air-visual-card.js#L425-L430 completely fixes the issues and all my cards show again
- i set the
weather
property toweather.my_home
in the card's config and loggedweatherEntity
again on line 426, and something strange happened, i got 2 logs:
weather.home
weather.my_home
and still got the error once.. this just gets stranger and stranger..
from air-visual-card.
@Swampen I created a PR for this: #56
from air-visual-card.
@jaruba Great! You found a solution.
I think maybe this line also might be causing some problems. https://github.com/dnguyen800/air-visual-card/blob/master/dist/air-visual-card-editor.js#L64
Did you by any chance configure it with the GUI?
I don't have contributer rights to this repo, so I can't do anything with your PR. @dnguyen800 needs to take a look at it.
from air-visual-card.
i'll update it today. Thanks for finding and fixing the issue!
from air-visual-card.
@dnguyen800 thanks! works great now
@Swampen yeah, i used the GUI to add the card and configure it, that default value shouldn't be used though.. weather.home
is only available for those that never changed their HA's home name, as the weather entity name changes according to the HA home name. (ex: if i set the home name to "My Home", the weather entity becomes weather.my_home
)
from air-visual-card.
Related Issues (20)
- Sample configuration does not work HOT 2
- After update to 0.107.1 air visual is not working HOT 10
- Air quality forecast HOT 2
- Flickering Face image HOT 12
- Rendering of dashboard in HA fails when one of sensors is not given HOT 3
- more-info no longer opens on HA 113.x HOT 3
- Feature Request: Option to hide the icon HOT 1
- Make it compatible with WAQI. HOT 19
- Top left corner do not round HOT 2
- Crazy, impossible to find in HACS HOT 2
- air_pollution_level does not work with template sensor
- How to change the size of text?
- AirVisual Descriptions Updated HOT 6
- Broken Image on 2.0 HOT 1
- Not working with Met Éireann HOT 2
- How change units metric/Imperial HOT 2
- Wind direction HOT 1
- Corners not rounded in the default HA theme
- Add official support for Tomorrow.io HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from air-visual-card.