mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-07 16:37:48 +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;
|
||||
case "in":
|
||||
if (Array.isArray(value) || typeof value === "string") {
|
||||
if (Array.isArray(value)) {
|
||||
value = value.map((val) => `${val}`);
|
||||
}
|
||||
return value.includes(state);
|
||||
}
|
||||
return false;
|
||||
case "not in":
|
||||
if (Array.isArray(value) || typeof value === "string") {
|
||||
if (Array.isArray(value)) {
|
||||
value = value.map((val) => `${val}`);
|
||||
}
|
||||
return !value.includes(state);
|
||||
}
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user