Monster Card + Slider entity row (two custom scripts in one card)

Hello guys,

I am struggling how to run two custom scripts in one lovelace card.
I have these two custom scripts for cards: Monster card and Slider entity row.


I like function of Monster card to hide card completely if none of the filtered entities are active.
And also like simple slider design of Slider entity row (compared to circular standard view).
So I would like to combine both these functions - when bulb is OFF - no additional card is displayed. When bulb is ON, then additional card appears with slider controls.

off

on

I am not able to run these together so now I use standard filter card, but when bulb is off ,I still have empty card displayed

card:
  show_header_toggle: false
  title: Lights Adjust
  type: entities
entities:
  - entity: light.bedroomsmall1
    full_row: true
    hide_when_off: false
    toggle: false
    type: 'custom:slider-entity-row'
  - attribute: color_temp
    entity: light.bedroomsmall1
    full_row: true
    hide_when_off: false
    toggle: false
    type: 'custom:slider-entity-row'
state_filter:
  - 'on'
type: entity-filter

Anyone can help with this one?

Cannot help, but I have the same question. Although I am using auto-entities :wink:

Here is how I’ve used that:

      - card:
          show_header_toggle: false
          title: Active Lights
          type: entities
        filter:
          exclude:
            - domain: switch
              entity_id: '*modem*'
            - domain: switch
              entity_id: '*plugin*'
            - domain: switch
              entity_id: '*charger*'
          include:
            - domain: light
              entity_id: '*lamp'
              options:
                toggle: true
                type: 'custom:slider-entity-row'
              state: 'on'
            - domain: light
              entity_id: '*_*'
              options:
                toggle: true
                type: 'custom:slider-entity-row'
              state: 'on'
            - domain: switch
              entity_id: '*_switch'
              state: 'on'
        id: active_lights
        show_empty: false
        type: 'custom:monster-card'
1 Like

Many thanks for your code. It actually works in the way I wanted. Anyway here I miss some details which I had earlier: I am using “Full_raw” option which looks more nicely but removes entity name. So I have used “Type: section” to put names and have some nice lines separating lights. Next thing is that now I am only able to control brightness of the light. In old version I have used Attribute option to add separate slider for color temperature.
Is there a way to implement these mentioned options to your code? I would appreciate that.

This is my old code:

card:
  show_header_toggle: false
  title: Lights Adjust
entities:
  - entity: light.bedroomsmall1
    label: Bedside Lamp
    type: section
  - entity: light.bedroomsmall1
    full_row: true
    hide_when_off: false
    toggle: false
    type: 'custom:slider-entity-row'
  - attribute: color_temp
    entity: light.bedroomsmall1
    full_row: true
    hide_when_off: false
    toggle: false
    type: 'custom:slider-entity-row'
  - entity: light.bedroom_lights
    label: Top Light
    type: section
  - entity: light.bedroom_lights
    full_row: true
    hide_when_off: false
    toggle: false
    type: 'custom:slider-entity-row'
  - attribute: color_temp
    entity: light.bedroom_lights
    full_row: true
    hide_when_off: false
    toggle: false
    type: 'custom:slider-entity-row'
state_filter:
  - 'on'
type: entity-filter