Combining shelly switch and smart bulbs

Hi everyone,

I’m trying to create a card on my HA dashboard that combines a shelly switch and some smart bulbs. Here’s what I’m looking for:

  • if the switch is off, the card only shows the switch button;
  • if the switch is on, the card expands a sub-menu with a slider and a button to control both, the temperature and light intensity when bulbs are available.

Screenshot 2024-02-07 at 13.52.27

What happens right now is that even if I turn off the light, the slider is still visible.

Any idea?