Help with my automation

Hey everyone I’m trying to move my automation from the config file to the automation file and I can’t seem to get if working. It worked in the config will but now it won’t work.

Here is what is in my automations.yaml file:

- id: weekday_cooldown
  alias: 'Weekday Cooldown'
  trigger:
    platform: time
    at: '16:00:00'
  condition:
    condition: time
    weekday:
       - mon
       - tue
       - wed
       - thu
       - fri
  action:
    - service: climate.set_operation_mode
      data:
	    entity_id: climate.nest
	    operation_mode: 'cool'
    - service: climate.set_temperature
      data:
	    entity_id: climate.nest
	    temperature: '80'

Thanks for any help!

Also I’m still not sure how to use a ‘code block’ on here like other forms so the formatting is off.

just select the text that forms your code and hit the </> icon (5th from the left)

1 Like

Got it thanks for the help! I’m sure my issue with the automation is a formatting error but the main automation write up on wiki doesn’t go into detail about how to use the automations.yaml just the configuration,yaml.

When you run a configuration check (eg with hassctl config) what error do you get?

1 Like

Can you show us your automation section/part of configuration.yaml

1 Like

Your automation has tabs on lines 17 and 18. Tab characters are not allowed in yaml code.

2 Likes

Sure it’s

automation: !include automations.yaml

Thanks!

Looks like that did the trick. Thanks so much for the help!