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?