Why isn't there a back navigation for dashboards?

Hi there,

the solution is a backslash. This will fix the error message.

tap_action:
action: navigate
navigation_path: /‘[[[window.history.back()]]]’

I use it for a fixed Button in the bottom of my mobile screen

type: custom:mod-card
card_mod:
style: |
@media (min-width:180px) {
ha-card {
z-index: 1;
position: fixed;
bottom: 21px;
left: 15px;
width: 65px;

     background: linear-gradient(grey 10%, black);
     border-radius:100px;
     border: 2px solid grey;
     padding: 10px
  }
@media (min-width:180px) {
  ha-card {
    width:  65px;
    left: 15px;
  }
}

card:
type: grid
square: false
columns: 1
cards:
- type: custom:button-card
icon: mdi:arrow-left-bold-circle-outline
tap_action:
action: navigate
navigation_path: /‘[[[window.history.back()]]]’
styles:
icon:
- width: 24 px
- color: white
img_cell:
- width: 30px
- height: 40px
card:
- background: none
- padding: 0

I know this is an old thread - maybe something’s changed but this works (with the toast popup “No navigation path specified”):

navigation_path: ‘[[[window.history.back()]]]’

But this doesn’t do anything:

navigation_path: /‘[[[window.history.back()]]]’

Any other ways to get rid of the error message?

Thanks.

Fixed with a hack. The reason you get the navigation path error is because the javascript isn’t returning a url, its running the window.history.back() function.
So the hack, is to set it to an unknown action.
Now, it works, with no popups.

tap_action:
  action: nothing
  navigation_path: |
    [[[ return window.history.back(); ]]]