Time trigger in automation.yaml now longer working after upgrade

I upgraded from 0.41 to 0.51 yesterday unfortunately my log file now gives me the following error and none of my automations work:

ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [after] is an invalid option for [automation]. Check: automation->trigger->0->after. (See /home/homeassistant/.homeassistant/configuration.yaml, line 126).

The line number is wrong as my automation.yaml only has a few lines in, nowhere near 126! Anyway, here is my automation that worked fine with version 0.41:

- alias: '#1 - Turn on at 15:30 on weekdays'                                                                                                                       
  trigger:                                                                                                                                                         
    platform: time                                                                                                                                                 
    after: '15:30:00'                                                                                                                                              
  condition:                                                                                                                                                       
  - condition: time                                                                                                                                                
    weekday:                                                                                                                                                       
      - mon                                                                                                                                                        
      - tue                                                                                                                                                        
      - wed                                                                                                                                                        
      - thu                                                                                                                                                        
      - fri                                                                                                                                                        
  action:                                                                                                                                                          
    - service: climate.set_temperature                                                                                                                             
      data_template:                                                                                                                                               
        entity_id: climate.thermostat1                                                                                                                             
        temperature: '{{ states.input_slider.desired_temp_occupied.state }}'                                                                                       
        operation_mode: Heat                                            

Could someone tell me why [after] is now an invalid option and what to replace it with?

Change “after” to “at”

Works perfectly now, thanks very much for your super-quick response :slight_smile:

#breakingchange: https://github.com/home-assistant/home-assistant/pull/7866

It’s a breaking change introduced in version 0.46

Automation - time: The after keyword for time triggers (not conditions) has been deprecated in favor of the at keyword. This resembles better what it does (old one still works, gives a warning) (@armills - #7846) (automation.time docs) (breaking change)
Automation - numeric_state: above and below will no longer trigger if it is equal. (@armills - #7857) (breaking change)
Broadlink switches: Entity ids will change for switches that don’t have a default name set. In this case the object_id is now used. (@abmantis - #7845) (switch.broadlink docs) (breaking change)
Disallow ambiguous color descriptors in the light.turn_on schema. This means that you can no longer specify both xy_color and rgb_color. (@amelchio - #7765) (breaking change)