Error in climate programming code

I can’t solve the error in the code of this automation:

alias: Splits - Programmazione riscaldamento
description: Accende e spegne il riscaldamento in modo automatico

trigger:

#   accensione
  - platform: time
    at: '18:00:00'

#   spegnimento
  - platform: time
    at: '22:00:00'

condition: []
action:
  - choose:
      - conditions:
          - condition: time
            after: '18:00:00'
			before: '18:01:00'
#
		sequence:
		  - service: climate.set_temperature
		    data:
		      temperature: 19
		    target:
		      entity_id: 
		        - climate.split_corridoio
		        - climate.split_salone
		  - service: climate.turn_on
		    target:
		      entity_id: 
		        - climate.split_corridoio
		        - climate.split_salone
#
      - conditions:
          - condition: time
            after: '22:00:00'
            before: '22:01:00'
		sequence:
		  - service: climate.turn_off
		    target:
		      entity_id: 
		        - climate.split_corridoio
		        - climate.split_salone
#
    default: []
mode: single

The error that is reported to me is this:

Error loading /config/configuration.yaml: while scanning for the next token
found character '\t' that cannot start any token
in "/config/automations/Riscaldamento/Splits - Programmazione riscaldamento.yaml", line 20, column 1

Could you help me? Thanks in advance.

You switch from indenting with spaces to using a mixture of tabs and spaces at the first before: line. You need to replace the tab characters with spaces.

I replaced tabs with the × character, and the switchover point is visible here:

condition: []
action:
  - choose:
      - conditions:
          - condition: time
            after: '18:00:00'
×××before: '18:01:00'
#
××sequence:
××  - service: climate.set_temperature
××    data:
××      temperature: 19
××    target:
××      entity_id: 
[ and so on ]

In the following screenshot, the areas shaded in green contain tab characters (which are not permitted and should be replaced by space characters).

The following is a streamlined version of your automation and does not contain any tab characters.

alias: Splits - Programmazione riscaldamento
description: Accende e spegne il riscaldamento in modo automatico
trigger:
  - id: 'on'
    platform: time
    at: '18:00:00'
  - id: 'off'
    platform: time
    at: '22:00:00'
condition: []
action:
  - if:
      - condition: trigger
        id: 'on'
    then:
      - service: climate.set_temperature
        data:
          temperature: 19
        target:
          entity_id: 
            - climate.split_corridoio
            - climate.split_salone
  - service: "climate.turn_{{ trigger.id }}"
    target:
      entity_id: 
        - climate.split_corridoio
        - climate.split_salone
mode: single

Thanks everyone. I didn’t know tabs weren’t allowed, maybe I’ve never encountered them before. Anyway, thanks again.

You’re welcome!

Please consider marking my post above with the Solution tag.

It will automatically place a checkmark next to the topic’s title. This indicates to other users that this topic has been solved and helps them find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.