How do you sleep / turn off the TV after the movie stops playing?

I’m running Kodi on an Nvidia Shield Android TV which has HDMI CEC. When I put my Nvidia to sleep, it automatically turns off my TV. Is there a way to have Kodi sleep and turn off the TV automatically after a movie is done playing?

I’ve trying installing an addon called Aerial and tried different settings on it but it either crashed Kodi or didn’t work at all.

Is this even possible with Kodi? What am I missing?