Conditional, sorted entity-filter card?

Is there a way to combine a conditional card with a entity-filter card with entities sorted by a value? What I’d want is a card like the following. This would show me where I should open the windows.

  +--------------------------+           
  | Rooms with humidity >65% |           
  ----------------------------           
  | Bathroom      72%        |           
  | Kitchen       68%        |          -
  | Bedroom       66%        |           
  |                          |           
  +--------------------------+ 

(It’ll only display rooms with humidity >65%, sorted by humidity. And if no room has a high humidity, the entire card is hidden)

Thanks!

Consider auto-entities card.
Details in the dedicated auto-entities thread.

1 Like

I have not tested the new possibilities with conditional card in 2023.11 yet, but I would use a helper for to be turned on (or off) by an automation when any of the sensors show above 65% or all below. Then I would use that as an condition when the card should be shown or not. For the entity-filter card (used as conditional card) it is fairly straight forward:

type: entity-filter
entities:
  - sensor.bathroom
  - sensor.kitchen
  - sensor.bedroom
state_filter:
  - operator: '>'
    value: '65'
card:
  type: entities

… but I have not found a way to sort them from highest to lowest.

Answer was given above)

This one here? I’m asking as the last commit was a year ago: GitHub - thomasloven/lovelace-auto-entities: 🔹Automatically populate the entities-list of lovelace cards

If yes, thanks, I’ll check the documentation on how to hide the entire card if no entity meets the condition.

Thanks. I currently have a (unsorted) entity-filter card. I just didn’t find out how to a) sort it and b) show it conditionally. I’m rather new to HA and can’t figure out yet how to use a helper to show/hide cards in lovelace.

If anyone else is having the same question, here’s the solution, based on the suggestion by @Ildar_Gabdullin :

  1. install auto-entities frontend repository via HACS
  2. create a new “manual” card in lovelace and enter YAML code (example see below)
  3. post questions in the thread: 🔹 Auto-entities - Automatically fill cards with entities
type: custom:auto-entities
card:
  type: entities
  title: High humidity
filter:
  include:
    - entity_id: sensor.*_humidity
      state: '>=60'
show_empty: false
sort:
  method: state
  numeric: true
  reverse: true

thanx. works well!!