Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/panels/lovelace/common/evaluate-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HassEntity } from "home-assistant-js-websocket";

export const evaluateFilter = (stateObj: HassEntity, filter: any): boolean => {
const operator = filter.operator || "==";
const value = filter.value || filter;
const value = ("value" in filter) ? filter.value : filter;
Comment thread
b3nj1 marked this conversation as resolved.
Outdated
const state = filter.attribute
? stateObj.attributes[filter.attribute]
: stateObj.state;
Expand Down