Mute android TTS notification when phone on vibrate

I’m using TTS notifications with my Android phone. I would like the TTS notification NOT to play when my phone is on vibrate. So far I haven’t found a solution.

Here is my code so far:

  - service: notify.mobile_app_oneplus
    data:
      message: TTS
      data:
        ttl: 0
        priority: high
        tts_text: You Got Mail!

Use sensor ringer mode as condition in your automation. In case my phone it is called sensor.sm_s906b_ringer_mode. It can be in state normal, vibrate or silent.

Thanks this is a good idea. However, the downside is that it can take several minutes for the ringer mode sensor to update. In some edge cases, the TTS message will still sound even-though your phone is on vibrate.

Well, that is best I’ve got, and this worked for me very reliable. The sensor is updated instantly, tested on my and my wife’s phone.

You could also use alarm_stream and just mute the alarm volume…