mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-08 00:47:47 +00:00
Fix operator in while numaric array
This commit is contained in:
parent
cae2f8e9e3
commit
013ae59043
@ -69,11 +69,17 @@ export const evaluateStateFilter = (
|
|||||||
return state !== value;
|
return state !== value;
|
||||||
case "in":
|
case "in":
|
||||||
if (Array.isArray(value) || typeof value === "string") {
|
if (Array.isArray(value) || typeof value === "string") {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
value = value.map((val) => `${val}`);
|
||||||
|
}
|
||||||
return value.includes(state);
|
return value.includes(state);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case "not in":
|
case "not in":
|
||||||
if (Array.isArray(value) || typeof value === "string") {
|
if (Array.isArray(value) || typeof value === "string") {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
value = value.map((val) => `${val}`);
|
||||||
|
}
|
||||||
return !value.includes(state);
|
return !value.includes(state);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user