Multiple Binary Sensor status in single script and play via TTS

Hi,
I’m trying to announce only OPEN state binary_sensor in my home. I have Door1, Door2, Door3 binary sensors. When I call a script, TTS announce door status via kodi media player. But I can’t get only open state sensor.

I’m digging the forum for IF, ELIF statements, but no luck. Is there any sample IF or MACRO loop for this control?

Thanks in advance.

Belek

I’m trying to do the similar thing.
Did you ever figure this out?
I am doing TTS to Kodi but my issue is how to get the TTS to say ‘open’ or ‘closed’ when binary sensor returns on or off.