TV recognized/integrated as google cast, possible to detect on/off status to control lights?

Is it possible to detect if a TV is on/off and use this to control lights?
It’s a Philips 55OLED854


Google cast integrates devices as a media player and i believe it only detects the state of this media player which will be on when you are casting something. Did you try the and android tv integration or philips tv integration