Navigation based on input select

I have an input_select which is set based on time of year(holidays). Based on this, I am trying to dynamically navigate to the appropriate page and also display the entity state as the name in a button card(YAML below). Admittedly I thought it should be simple, but I can’t figure out the YAML. I’ve tried multiple versions of return/variable/states, it seems so obvious but I’m missing something.

type: button
entity: input_select.holiday
tap_action:
  action: navigate
  navigation_path: /lovelace-areas/"{{ states('input_select.holiday') }}"
name: '{{ states(''input_select.holiday'') }}'
hold_action:
  action: none
show_icon: false

1. Code should be posted formatted. You can see yourself that it lost indents which are crucial in yaml.
2. You are trying to use templates in a button card - but templates are not supported here. Only a few standard card support templates. Consider using a custom card which does support templating (config-template-card, button-card, …).

Yes, forgive me I was trying to copy and paste in a hurry and didn’t format it. I just got back to this, I had tried a custom card before but I can’t get the template to spit out the state of the entity, it keeps it as full text and displays exactly what I put in there or tries to navigate to that path. It has to be something simple but I have tried multiple iterations and the closest I get is an error stating “states is not part of return”

type: custom:button-card
entity: input_select.holiday
name:[[[return states("input_select.holiday").state]]]
tap_action:
  action: navigate
  navigation_path: /lovelace-areas/[[[return states['input_select.holiday'].state ]]]
hold_action:
  action: more-info
show_icon: false
triggers_update: all

  1. Suggest to continue this discussion in the dedicated button-card thread.
  2. In short - mixing 2 different ways of templating.
    Jinja - not supported in buton-card (which is here actually a wrong mix of jinja & JS):
name:[[[return states("input_select.holiday").state]]]

JS must be used instead like here (but this is also not 100% correct, see next comment):

/lovelace-areas/[[[return states[[[return states['input_select.holiday'].state ]]]

And you cannot concatenate a string and a template.
This is wrong:

navigation_path: /lovelace-areas/[[[return states['input_select.holiday'].state]]]

as well as this:

navigation_path: /lovelace-areas/[[[states['input_select.holiday'].state]]]

must be

navigation_path: >-
  [[[ return ('/lovelace-areas/' + states['input_select.holiday'].state) ]]]

Thank you for explanation. I should have known I was attempting to build a string link but that just wasn’t clicking. Appreciate the help, it is working as expected with your code.

If I could move the topic I would, I should have done so when switched to the custom button card.

No, you cannot move.
Anyway, now you know that button-card-related things is better to discuss there)