thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.2k stars 111 forks source link

Can filter allow comparison with other entity values? #344

Open jdiegmueller opened 1 year ago

jdiegmueller commented 1 year ago

Is it possible to do numerical comparison against an entity value as opposed to a fixed value? From the README:

  include:
    - attributes:
        battery: "<= 50" # Attribute battery_level is 50 or less

The above will include devices with battery at 50% or more. But rather than saying "if less than or equal to 50", is it possible to say "if less than or equal to the value of input_number.battery_display_threshold"? Then changing input_number.batter_display_threshold would change the result without changing the actual Lovelace code.

ildar170975 commented 1 year ago

Your only option is defining your own filter with the "template" option. Check community for examples.

jdiegmueller commented 1 year ago

Your only option is defining your own filter with the "template" option. Check community for examples.

Ok, cool. That's how I've handled it for now. Thank you.