How can I sleep my iMac's internal display when it's not in use, but not my attached tv (playing video)
DisableMonitor

I found an open source project called DisableMonitor and it worked for me on macOS 10.12, Sierra, as well.




  Warning
  
  It has been reported that the software is able to cause irretrievable damages to your computer.
  Use at your own risk!
  
  The project development has been stopped and won't be continued, if you want to be a maintainer consider opening an issue.