Can you format your code correctly please? (look at the blue bar on top of the page). It’s very difficult otherwise to check your code…
Also please confirm which automation is working and which is not
do the actual states get reflected in HA?
My first thought would be the issue is not with HA but with the hub / device that you use to receive these signals.
For example I use an RFXTRX to catch 433MHz signals. While the RFX is busy receiving the information from 1 device, it can’t receive info from another one at the same time…
I’m wondering why you have a delay at the end of your automation when there is no action to follow?
If states are accurately reflected, that could be the other explanation: the delay holds the “handle” on your sonos, stopping it from receiving more commands. (that’s me potentially making things up here, not sure of my theory) Have you tried without the delay?
The RasPi would get both sensors’ signals because these sensors (Honeywell 5800MINI) would send data a couple times.
I have tried to comment out the delay, then the Sonos would TTS the first sensor then be cut off by another the second sensor sometimes. I am thinking is it possible to queue triggers?
The problem is more likely that the second notification can’t play whilst the first one is already playing, so you need a wait_template that waits for the media player to be idle before making the announcement.