Is there a way to use the custom button card inside of the conditional button of home assistant?

Below is what I have so far:

Is there anyway to get this to show up in my dashboard based on the condition of another entity. If so, Can someone show me an example of how to do this?

Can the conditional card somehow be used along with the below to make it happen?

type: custom:button-card
entity: script.good_night
icon: mdi:sleep
color_type: icon
tap_action:
  action: call-service
  service: script.turn_on
  data:
    entity_id: script.good_night
styles:
  icon:
    - color: yellow
  card:
    - background: url('/local/images/goodnight-moon.jpg')
    - background-size: cover
    - background-position: center
    - color: yellow

That is exactly what the conditional card is for. :slight_smile:

There are some pretty good examples in the documentation.

I think I just don’t understand how to nest one card under the condition. As in, how do I use the previous code post as the displayed button. But then have a condition to it of another entity. I don’t understand how to write it I don’t think.

oh, I’m an idiot. Thank you for the link to the docs. Let me give it a try.

You insert your card under the cards section.
The conditions are what makes the card show or hide. It is the state of some entity.

I think I’m following now. I was making that way more complicated than I should’ve been. :slight_smile: