I’m running Dockerised hass.io on a Raspberry Pi2 with my Xiaomi Aqara hub (lumi gateway v3) & various Sonoff switches on stock firmware. I have tried my very first automation with a Xiaomi Mijia smart button and failed. The Mi Home app is logging all the button presses. The Sonoff switches and the Aqara hub light work OK when controlled from the cards on the front page of HA. I have also unsuccessfully tried it with a TP Link switch. This is what I have in my configuration.yaml file:
Thanks everyone, I finally got it figured. I had entered the commands in the configuration.yaml file instead of automations.yaml. Told you it would be a stupid noob error!