Navigation Return

This is pursuant to my question about copying via an action, the current URL. That inquiry has seen no comments. I have seen some ideas to create a ‘back’ function from a view using windows.history.back but this doesn’t work for me. It always returns to the topmost view in the sidebar. Perhaps I did not implement it correctly.
What I am attempting is that after navigating to a different view from a Lovelace card is to provide a return (back button) to the calling view. A static return address will not work as there are multiple views involved on different platforms. Here is my attempt using the windows.history.back function:

type: entities
entities:
  - entity: sensor.econet_etwh_heating_element_state
    name: WH_State
  - entity: sensor.econet_etwh_lower_tank_temperature
    name: Lower Temp
  - entity: sensor.econet_etwh_upper_tank_temperature
    name: Upper Temp
  - entity: sensor.hw_recirc_temp
    name: HW Ret
  - entity: switch.hw_recirc
    name: Pump
  - entity: sensor.hw_pump_ontime_hm
    name: OnTime
  - entity: input_boolean.override
    tap_action:
      action: call-service
      service: script.Pump_override
  - type: custom:button-card
    entity: input_button.returnurl
    size: 12px
    name: Return
    styles:
      card:
        - width: 100px
        - background-color: lightgreen
    tap_action:
      action: navigate
      navigation_path: '/[[[window.history.back();]]]’
    show_header_toggle: false
    card_mod: null
    style: |
      ha-card
      {% set temp = states('sensor.hw_recirc_temp')|int %}
      {% if temp > 102 %}
          { border: 5px solid red }
      {% elif (temp <=102) and (temp >=95) %}
          { border: 5px solid yellow }
      {% elif temp < 95 %}
          { border: 5px solid blue }