I have a picture glance card with 2 gates buttons like below
and when I press the gate buttons I get another pop up with open close like so
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
petro
(Petro)
September 4, 2019, 7:24pm
2
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
Can I move it back left somehow?
petro
(Petro)
September 4, 2019, 9:33pm
4
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') }}"
petro
(Petro)
September 4, 2019, 9:34pm
5
Unfortunately, no. The left side is reserved for ‘sensors’ (that can’t be switched), the right side is switch like things.
petro:
Your value_template has the wrong state I believe. Because of this, it always thinks the cover is closed so it will only open.
Copy to clipboard
value_template: "{{ is_state('cover.main_gate', 'open') }}"
Yes that did the trick thanks, too bad about the positioning.
Any custom picture glance card perhaps?
petro
(Petro)
September 6, 2019, 11:34am
7
You can do anything with a picture-element card. I don’t believe there is any custom picture glance cards at the moment.
tman75
(Troy )
March 29, 2021, 11:11pm
8
Thank you. Making the cover a switch template and putting it in my picture-glance card what exactly what I wanted. Thanks.
hvardrino
(Héctor Varghese)
March 9, 2023, 4:39pm
9
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?
hvardrino
(Héctor Varghese)
November 28, 2024, 2:11pm
11
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