thomasloven / lovelace-auto-entities

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

How to use and: / or: #397

Open JOHLC opened 10 months ago

JOHLC commented 10 months ago

In the documentation it shows the ability to use and: as well as or: in filters.

https://github.com/thomasloven/lovelace-auto-entities#filters

How is that done?

alexanderphoenix commented 10 months ago

I'm also interested in knowing how to use and:, or:, and by extension not:. For instance I'm trying to exclude a light depending on whether a "christmas" toggle is "on":

type: custom:auto-entities
card:
  type: glance
filter:
  include:
    - domain: light
  exclude:
    - entity_id: light.conservatory_fair
      and:
        - entity_id: light.stairs_strip
          state: 'on'
        - entity_id: input_boolean.christmas_toggle
          state: 'on'
ildar170975 commented 10 months ago
  1. Suggest to ask questions in the dedicated auto-entities thread in HA Community - and leave Github for reporting bugs & proposing FRs.
  2. Here are examples of using AND, OR, NOT - https://community.home-assistant.io/t/auto-entities-automatically-fill-cards-with-entities/147801/1127?u=ildar_gabdullin
alexanderphoenix commented 10 months ago

Thank you for writing the examples on the link, and good idea! perhaps those examples could be added to README.md for future reference