Comments (3)
I tested your change but it caused a crash. Can you double-check that this change works on your end?
from air-visual-card.
Hey @dnguyen800 , sorry I couldn't verify that once again because currently I'm doing a reconfiguration of my HA instance.
What I can say is that the fix I proposed just solved my problem. In my case the sensor.config
property was null
because I didn't pass on of sensors in Lovelace configuration.
Can you please give me some details of error and an use case to reproduce it? To be honest I'm a backend developer and I didn't care much about browser compatibility π
See here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
Maybe that's the reason?
from air-visual-card.
I'm not a programmer and never actually learned Javascript (besides looking at other people's examples, so I have a lot of gaps in knowledge unfortunately...
What I wanted to understand was in this line of code (see below), you added a question mark '?', but I wasn't sure what it does. It's hard to search online for what a ? means in code, haha. I tried using the fix in my instance and it crashed the UI, though maybe I should double-check again if it works on your end.
if (sensor.config?.split('.')[0] == 'sensor')
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
- 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
- No other cards are visible after I added this card HOT 8
- 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.