Picture glance card with gate button

I have a picture glance card with 2 gates buttons like below
image
and when I press the gate buttons I get another pop up with open close like so
image

I want the gate buttons to just toggle the gate on/off without the pop up, is that possible?

camera_image: camera.front
camera_view: live
entities:
  - cover.second_gate
  - cover.main_gate
  - switch.meross_front_spots
  - switch.meross_front_led_strips
  - switch.front_downlights
title: null
type: picture-glance

Cover services don’t work in picture glances. Only turn_on / turn_off services do. You’ll have to use a picture-elements card or make a template switch that moves your cover and place the template switch in your picture glance.

Great idea so I did just that and while the gate opens, it doesn’t seem to close (the cover.close is there) so not sure why, is the value_template wrong? I followed https://www.home-assistant.io/components/switch.template/

     main_gate:
        value_template: "{{ is_state('cover.main_gate', 'on') }}"
        turn_on:
          service: cover.open_cover
          data:
            entity_id: cover.main_gate
        turn_off:
          service: cover.close_cover
          data:
            entity_id: cover.main_gate
        icon_template: >-
          {% if is_state('cover.main_gate', 'open') %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}

Oh and as a switch it seems to join the lights on the right hand side
image

Can I move it back left somehow?

Your value_template has the wrong state I believe. Because of this, it always thinks the cover is closed so it will only open.

value_template: "{{ is_state('cover.main_gate', 'open') }}"

Unfortunately, no. The left side is reserved for ‘sensors’ (that can’t be switched), the right side is switch like things.

Yes that did the trick thanks, too bad about the positioning.
Any custom picture glance card perhaps?

You can do anything with a picture-element card. I don’t believe there is any custom picture glance cards at the moment.

Thank you. Making the cover a switch template and putting it in my picture-glance card what exactly what I wanted. Thanks.

I have the same issue, but my case is that I have a motorized camera that moves up, down, right and left through button entities. So when I put the buttons in this card it also answers with a pop up window for the button entity when I press them. Any clue on how to do that?

Already got a solution for this?

camera_view: live
type: picture-glance
entities:
  - entity: media_player.tv_living_room
    tap_action:
      action: call-service
      service: select.select_option
      target:
        entity_id: select.salon_move_to_preset
      data:
        option: Sofá
    icon: mdi:sofa
  - entity: button.salon_move_left
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.salon_move_left
  - entity: button.salon_move_up
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.salon_move_up
  - entity: button.salon_move_down
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.salon_move_down
  - entity: button.salon_move_right
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.salon_move_right
  - entity: media_player.tv_living_room
    tap_action:
      action: call-service
      service: select.select_option
      target:
        entity_id: select.salon_move_to_preset
      data:
        option: Puerta
    icon: mdi:door
  - entity: script.camara_modo_privacidad
    tap_action:
      action: call-service
      service: script.turn_on
      target:
        entity_id: script.camara_modo_privacidad
  - entity: media_player.tv_living_room
    tap_action:
      action: call-service
      service: select.select_option
      target:
        entity_id: select.salon_move_to_preset
      data:
        option: Sofá 2
    icon: mdi:sofa-outline
title: Salón
camera_image: camera.salon_sd_stream

This is what I have done with mine