Window sensors, automation with groups

Hi,

I have window sensors which can have the following states: open, close, tilted
Now I would like to achieve two things:

  1. Visual indicator
    I would like to show the state of the windows with an LED. If at least one window is tilted then I want to slowly slash, if at least one window is open, I would like to fast flash. Second automation override the first obviously.
  2. TTS indicator
    If you press a button (next to the LED) it should say
    “The following windows are open” ${list of rooms with open windows}"
    " the following windows are tilted" ${list of rooms with tilted windows}"

I can definitly manually “hack” this together somehow, but I wonder if there is an elegant solution with groups or helpers. Any hint is highly appreciated!

Best regards,
Jonas