I found out what went wrong;
I have been using Visual Studio Code in windows to edit my yaml files. But for some time I have been using the one in HA. This time, however, I used VSC again and I accidentally edited an old version of automations.yaml in VSC and saved it to HA
Thanks for the help and inputs!