This flow turns all the thing you want on or off when WiFi is enabled/disabled.
It will turn media sound off, brightness full, ringer vibrate and ask you if you want to turn on data when you turn WiFi off.
It will turn media sound on, data off and ringer on when you turn WiFi on.
*this is best used with my auto WiFi flow http://llamalab.com/automate/community/flows/14419
**(you must have a rooted device if you want it to enable/disable mobile data)