Automation: Template with input_select option

Hi,
I’m working with hassio and I’ve used lot of templates in my automation.
Today I’m struggling with the code below.
My target is set a value in a select depending on a boolean value.
Where I’m wrong?

- alias: set Winter Daily Home temp mode
  trigger:
    platform: time
    minutes: '/1'
  condition:
    condition: time
    after: '06:30:00'
    before: '23:00:00'
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
  action:
    service: input_select.select_option
    data_template:
      entity_id: input_select.temp_mode_all_rooms
      option: >
        {% if is_state('input_boolean.at_home', 'on') %}
          'Living'
        {% else %}
          'Medium'
        {% endif %}
1 Like

Just remove the tics ’ from around ‘Living’ and ‘Medium’ like this:

{% if is_state('input_boolean.at_home', 'on') %}
  Living
{% else %}
  Medium
{% endif %}

I tried and it works properly! Thanks!
Before that I’ve written this automation and it works, Why does it work in this case? (both contiion and action)

- alias: Manage Season - Vacation
  trigger: 
    platform: state
    entity_id: input_select.season
  condition:
    condition: state
    entity_id: input_select.season
    state: 'Vacation'
  action:
    service: input_select.select_option
    data:
      entity_id: input_select.temp_mode_all_rooms
      option: 'Vacation'

Many Thanks!