Setting page title or url to a varable in dashboard yaml

Hi All,

I’m trying to set the opacity on the mushroom template card based on the current url or page name however can’t seem to work out whether a variable will work or some other method. The opacity functionality works, I just need to replace that first if string with a variable.

          - type: custom:mushroom-template-card
            primary: Home
            icon: mdi:sofa
            icon_color: blue
            layout: vertical
            tap_action:
              action: navigate
              navigation_path: home
            fill_container: false
            secondary: ''
            card_mod:
              style: |-
                ha-card {
                  {% if ('/lovelace-tablet/home-new' == '/lovelace-tablet/home-new') %}
                  opacity: 1;
                  {% else %}
                  opacity: 0.5;
                  {% endif %}
                }

Cheers,
Paul