Turn off tap action on gauge/entity?

Hi All!

I have a public facing dashboard (as in it is in my kitchen!) for lighting, and I have a gauge showing power generation from solar and another consumption from grid. The problem is if someone taps it it will open up the popup with history. Trouble is that it allows access to the “show more” which will then get the dashboard stuck as I am hiding the top bar (again public facing and don’t want people fiddling).

The dashboard is running on a Pi with a touchscreen so I don’t have android back buttons etc.

Is there anyway to disable to default tap option (like you can with a button) to prevent the pop-up from appearing? The same is true for the Entity card as well, there is no way as far as I can see to prevent the recent history pop-up for appearing.

Just thought as well, having a tap action customisable could be useful as well as it would allow redirecting to a service or another page etc rather than just the history pop-up.

Gauge with disabled “tap_action”:

type: gauge
entity: sensor.processor_use
card_mod:
  style: |
    ha-card {pointer-events: none;}

image

Entity with disabled “tap_action”:

type: entity
entity: sun.sun
card_mod:
  style: |
    ha-card {pointer-events: none;}

image

1 Like
                  - type: template
                    entity: binary_sensor.deursensor_koelkast_contact
                    icon: |-
                      {{ iif(is_state('binary_sensor.deursensor_koelkast_contact', 'on'), 'mdi:fridge-alert', 'mdi:fridge') }}
                    icon_color: |-
                      {{ iif(is_state('binary_sensor.deursensor_koelkast_contact', 'on'), 'yellow', '[36,36,36]') }}
                    card_mod:
                      style: |
                        ha-card {
                          {% if is_state('binary_sensor.deursensor_koelkast_contact','on') %}
                          animation: blink 0.4s linear infinite;
                          }
                          @keyframes blink {
                            50% {opacity: 0;}
                            }
                          {%- else -%}
                          box-shadow: 0px 0px;
                          {%- endif %}
                          pointer-events: none;
                          }

why is this not working ?

What you posted is not related to Gauge or Entity.
Suggest to ask in mushrooms.

but is is about your pointer-events…

I see. I would help, but cannot. Sorry. Have no mushroom in my household ((
But what I can see - a weird placement of templates:

                        ha-card {
                          {% if is_state('binary_sensor.deursensor_koelkast_contact','on') %}
                          animation: blink 0.4s linear infinite;
                          }
                          @keyframes blink {
                            50% {opacity: 0;}
                            }
                          {%- else -%}
                          box-shadow: 0px 0px;
                          {%- endif %}
                          pointer-events: none;
                          }

Why you do not make it

                        ha-card {
                          {% if is_state('binary_sensor.deursensor_koelkast_contact','on') %}
                          animation: blink 0.4s linear infinite;
                          {%- else -%}
                          box-shadow: 0px 0px;
                          {%- endif %}
                          pointer-events: none;
                        }
                        @keyframes blink {
                          50% {opacity: 0;}
                        }
                        
1 Like