Play sleep mode

I would like to see a play sleep…i.e. If I have radio mode on the server will stop or ideally fade out the music out after a predetermined time…after that activity could set sleep mode on the server too, but I’m more interested to close the stream off after I have dosed off