mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 14:27:20 +00:00
Filter out non number states instead of assigning them 0 (#1987)
This commit is contained in:
parent
e5fe2950af
commit
cf19ceb193
@ -115,7 +115,9 @@ class HuiSensorCard extends EventsMixin(LitElement) {
|
||||
}
|
||||
|
||||
_getValueArr(items) {
|
||||
return items.map((item) => Number(item.state) || 0);
|
||||
return items
|
||||
.map((item) => Number(item.state))
|
||||
.filter((val) => !Number.isNaN(val));
|
||||
}
|
||||
|
||||
_calcCoordinates(values, width, height) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user