Actor Sean Hayes is returning to NBC and will play a gay dad in a yet-to-be named comedy.

NBC programming chairman Robert Greenblatt announced earlier this month at the Television Critics Association (TCA) meet up in Los Angeles that Hayes was in talks to return to the network where he played gay best friend Jack McFarland on the hit sitcom Will & Grace for 8 seasons.

Forty-one-year-old Hayes has since come out gay, insisting he never hid his sexual orientation.

According to Entertainment Weekly, the comedy will focus on a family that includes a 12-year-old boy being raised by two dads. No word yet on who'll play Hayes' partner.

Peter Tolan, co-creator of cabler FX's Rescue Me, is near a deal to sign on as writer and executive producer of the show, bringing his creative partner Michael Wimer. The show will be produced by Universal Media Studios and Sony Pictures TV.

Gay entertainment website notes that before creating the gritty drama Rescue Me, Tolan wrote for several sitcoms, including Murphy Brown and The Larry Sanders Show, and the comedy films Analyze This and Guess Who.