Show entities conditionally, only show if they exist?

are you asking to conditionally show the multiple entity Flame Out, or the whole line for Floor_pump

if the first, you should hop over to https://github.com/benct/lovelace-multiple-entity-row and ask the author if that’s possible. If the latter you could maybe use 2 conditionals. The first conditional to have the Pump show with all secondary entities, and the second conditional to only show the Power and State.

in all cases the card config should be like:

  - type: conditional
    conditions:
      - entity: sensor.last_flame_out
        state_not: Flame On # <--- are you sure this is the real state of the sensor?? always check developer-tools/state
      - entity: switch.floor_pump_208
        state_not: 'on'
    card:
      type: entities
      entities:
        - type: custom:multiple-entity-row
          entity: sensor.floor_pump_power
          etc etc

Thanks for attending to my issue. Yes indeed, I only want to conditionally show the multiple entity Flame out. Hence, I will take it further as you proposed.

you could do this now already:

  - type: conditional
    conditions:
      - entity: sensor.last_flame_out
        state_not: Flame On # <--- are you sure this is the real state of the sensor?? always check developer-tools/state
      - entity: switch.floor_pump_208
        state_not: 'on'

    card:
      type: entities
      entities:
        - type: custom:multiple-entity-row
          entity: sensor.floor_pump_power
          etc etc

  - type: conditional
    conditions:
      - entity: sensor.last_flame_out
        state: Flame On # <----- Note the other condition here
      - entity: switch.floor_pump_208
        state_not: 'on'

    card:
      type: entities
      entities:
        - type: custom:multiple-entity-row
          entity: sensor.floor_pump_power
          etc etc

this will show the multiple-entity-row card based on either set of conditions, and you can adapt the config of the MER card to match what you want to see (leave out the Flame Out )

1 Like

Please excuse my being new to HA…
But I tried the different versions found above, but… with no luck.
I’ve many entities that, for different reasons, are sometimes unavailable. And I’d like avoiding those yellow alerts (when my NAS or printer is switched off, when a sensor is not available, etc.). Like in this case:

I tried this code in my dashboard raw configuration editor…

(…)

views:
  - theme: Backend-selected
    title: SYSTEM
    path: system
    icon: mdi:raspberry-pi
    visible:
      - user: 2fd9575fac214c19baae7ed00e77088b
      - user: 7b14723aa6a0455faee3d93d9f8e725c
    badges: []
    cards:   #MY NEW CUSTOM CODE STARTING HERE...
      - type: custom:auto-entities
        show_empty: false
        card:
          type: entities
          title: Stato batterie disponibili
          show_header_toggle: false
        filter:
          exclude:
            - state: unavailable
          include:
            - entity_id: sensor.hue_motion_doccia_battery
            - entity_id: sensor.hue_motion_studio_battery
            - entity_id: sensor.hue_motion_ripostiglio_battery
            - entity_id: sensor.hue_motion_garage_battery
            - entity_id: sensor.cucina_switch_battery
            - entity_id: sensor.switch_garage_01_battery
            - entity_id: sensor.smoke_sensor_battery_state
      - type: gauge
        entity: sensor.cpu_temperature

(…)

But I keep getting errors… I’m not yet an YAML expert so… please any help would be greatly appreciated!

Many thanks in advance!

first of all: did you install custom resource auto-entities? It’s not core HA, so you need to install that first.

1 Like

Thanks! Damn… really a newbie… my fault: I didn’t know there was an add-on to install…
I’ve done it, via HACS, and it did immediately work.
Many thanks, again!!

1 Like

You’re most welcome! That’s what we’re here for. Glad I could help