Climate automation error

Hi Guys,

This is the first time I’m trying to setup an automation and im struggeling to get it to work correctly, I have made a datetime input and a boolean input.

What im trying to acheive is to turn my AC unit off at a set time if Ive activated that funtion

here is my error:

2022-07-09 07:28:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [automation air_conditioning_control] is an invalid option for [automation]. Check: automation->automation air_conditioning_control. (See /config/configuration.yaml, line 8).

here is my code:

/config/automations.yaml

# Controlling my AC unit
automation air_conditioning_control:
  # When it reaches a set time turn the AC on and activate switch on
  - alias: "Turn the AC on"
    trigger:
      - platform: time
        at: input_datetime.ac_turn_on
    condition:
      - condition: state
        entity_id: input_boolean.ac_turn_on_activate
        state: "on"
    action:
      - service: climate.turn_on
        target:
        entity_id: climate.daikin_ac

/config/configuration.yaml

input_datetime:
  ac_turn_on:
    name: AC on time
    has_date: false
    has_time: true
  ac_turn_off:
    name: AC off time
    has_date: false
    has_time: true

input_boolean:
  ac_turn_on_activate:
    name: Turn AC on at this time
    initial: false
  ac_turn_off_activate:
    name: Turn AC off at this time
    initial: false

Thanks for your help.

Change the sesond line:

automation air_conditioning_control:

to this:

air_conditioning_control:

Thanks for your help,

It worked when I commented out the whole line, I was using the exsamples from here and they all have that line in.

All the best

Jon

That example is for implementation in the configuration.yaml file, not the automations.yaml file.

1 Like