How is it my tv it doesn't make any sense. When I watch tv never did the screen ever dim or get brighter at times. And never when playing on my PS3 or 360 did the screen ever dim mid gameplay.
My thoughts are that the light sensor on the PS4 changes according to the light in the room.
If you actually want a solution you need to go through the basic troubleshooting steps first—check your TV's settings. With most modern HDTVs you have a different settings template for each input. For example, on my TV I use dynamic contrast and the eco sensor on HDMI 1, because it's just my cable box. But on HDMI 2 and 3 I have those settings disabled for my gaming consoles.
You're most likely using a new input for your PS4, which means it hasn't been configured yet. Default settings almost always use the eco sensor.
Look at your TV settings and see if you have some dynamic mode set, or a power saver mode set. My Samsung Smart TV has the option to change the lightning of the screen based on how dark/bright it is, and there's also a power saving mode.
My screen dims too, always has done, but not while playing a game or watching a movie, at least not unless I put the controller down for a certain amount of time, then the screen automatically dims, moving the controller or simply picking it up again & the screen brightens back to it's regular brightness setting.
Customer Service Available Mon-Fri 8am - 8pm
General Enquires - 1-800-345-SONY (7669)
Account & Billing Support -1-877-971-SONY (7669)
Live Chat Available Mon-Sat 6am-10pm PST & Sun 6am-8pm - LiveChat