There is no service to change the mode in the current air purifier component.
You can do it with a shell command like the below.
With them, you can make a automation what you want.
shell_command:
mi_air_mode_auto: /srv/homeassistant/bin/mirobo --ip 192.168.0.15 --token 2a4d39a5721f983fdceae9193fc35555 raw_command set_mode ‘[“auto”]’
mi_air_mode_silent: /srv/homeassistant/bin/mirobo --ip 192.168.0.15 --token 2a4d39a5721f983fdceae9193fc35555 raw_command set_mode ‘[“silent”]’
mi_air_mode_favorite: /srv/homeassistant/bin/mirobo --ip 192.168.0.15 --token 2a4d39a5721f983fdceae9193fc35555 raw_command set_mode ‘[“favorite”]’