Hide remote buttons

Hi there,

I’m trying to further clean up Lovelace and eventually get it down only to a few views.

One area is my family room view. I created a “remote” grid via button cards and horizontal/vertical stacks.

I was hoping I might be able to leverage the fold entity row, but it can only handle regular entities and it appears it can’t handle the entities nested in horizontal and vertical stacks.

Anyone use something like monster card or otherwise to hide the “remote” until I have the TV on as the condition?

Looking for ideas.

I’d like to either hide the whole remote until tv is on (like an entity filter) or at least be able to collapse it to conserve space

Thx!!

Below is a screenshot from my phone

This is desktop / tablet view

You can take a look at my configuration listed in my profile. I use a conditional card to display different remotes based on a sensors status.

search for CONTEXT VOLUME CONTROLS in ui-lovelace.yaml. That’s where my conditionals start.

EDIT: It can get confusing, ask any question. It uses anchors, so if you see some odd syntax feel free to ask, but it’s most likely anchors.

thank you i’ll have a look

i’m taking a look at your code now. how do the anchors work? is there some reference documentation somewhere on it?

how would i convert what i have (1st code block) to what you have (2nd code block)?

                - type: entity-button
                  name: Exit
                  tap_action:
                    action: call-service
                    service: script.turn_on
                    service_data:
                      entity_id: script.harmony_exit
                  entity: script.harmony_exit

# OK BUTTON

                          - <<: *cb_remote_name_as_icon
                            name: OK
                            label: Confirm
                            tap_action:
                              action: call-service
                              service: remote.send_command
                              service_data:
                                <<: *harmony_xbox
                                command: "OK"

ok, i’m seeing the anchor section at the top of the lovelace config. i’ll get to working

got it working. thx for the point in the right direction @petro.

i decided to not bother with the anchors now and sticking with the entity button vs using the custom button card but seems fine.

will need to look into these anchors at a later date.

definitely looks handy for cards with a lot of styling and formatting that i reuse like the mini graph cards.

Yeah, anchors are useful when you have repeated yaml. They are a part of yaml, not home assistant. I don’t think home assistant covers anchors in it’s documentation.