Use the title or the path of the current view

Hello everyone,

To simplify my code, I would need to retrieve the string that corresponds to the title of the current view or, failing that, the path.

As for example states[‹ sensor.temperature_exterieure_sud ›].state will give me the temperature of my entity, I would like to find the syntax that gives me information on the current view.

I did research in French and English but the terms view, path and title are so widespread that I can’t find it. I’m sure it can be retrieved in a variable.

Thanks for your help.

   [[[ return '#temperature ' +
   states['sensor.temperature_exterieure_sud'].state; ]]]
1 Like

i find

[[[ return window.location.pathname.replace("/lovelace/","")]]]

2 Likes