mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-09 17:37:46 +00:00
Merge condition to set the entity to filter on
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
parent
2c91e2dbc7
commit
69310d2d45
@ -258,13 +258,12 @@ export function buildConditionForFilter(
|
||||
|
||||
// Set the entity to filter on
|
||||
if (
|
||||
"condition" in newCondition &&
|
||||
(newCondition.condition === "numeric_state" ||
|
||||
newCondition.condition === "state")
|
||||
("condition" in newCondition &&
|
||||
(newCondition.condition === "numeric_state" ||
|
||||
newCondition.condition === "state")) ||
|
||||
"operator" in newCondition
|
||||
) {
|
||||
newCondition.entity = entityId;
|
||||
} else if ("operator" in newCondition) {
|
||||
newCondition.entity = entityId;
|
||||
}
|
||||
|
||||
return newCondition;
|
||||
|
Loading…
x
Reference in New Issue
Block a user