BTT detect active external display

Similar to this post, I wanted to perform an automation based on the active monitor (maybe using conditional groups). I have an external monitor that I switch sometimes to another PC, yet I don't disconnect it from the mac. I wanted to know if it is possible to detect if the monitor is displaying the image or anything similar.
Many thanks in advance