Skip to content

Commit 46ff440

Browse files
authored
Merge pull request #45 from Swampen/master
Fixes WAQI parse check
2 parents 4e29bf9 + 3f4d00b commit 46ff440

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dist/air-visual-card.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ class AirVisualCard extends HTMLElement {
309309
}
310310
// Check if APL is an WAQI sensor (because the state is an integer). Returns 'NaN' if it is not a number
311311
if (typeof hass.states[aplSensor.config] != "undefined") {
312-
if (parseInt(hass.states[aplSensor.config].state) != 'NaN') {
312+
let aplParse = parseInt(hass.states[aplSensor.config].state)
313+
if (!isNaN(aplParse)) {
313314
apl = APLdescription[getAQI()];
314315
} else {
315316
apl = hass.states[aplSensor.config].state;

0 commit comments

Comments
 (0)