Reading Sonos Alarm Events

Is there any way to read the Sonos System for alarm events?

I want to be able to get some actions done as soon as a Sonos alarm is happening. (and no it is currently not yet possible to use home assistant to trigger the wake up alarm for various reasons :wink:

I believe I have what you need!

This is the automation I use to turn on my lights when the Sonos alarm goes off, the luminance is below 5.0, it is between midnight and 8 AM and the light is not on.

automation 3:
  alias: "Wake up Lights"
  trigger:
    platform: state
    entity_id: media_player.play_1
    to: 'playing'
  condition:
    condition: and
    conditions:
      - condition: numeric_state
        entity_id: sensor.aeotec_zw100_multisensor_6_luminance_5_3
        below: 5.0
      - condition: template
        value_template: '{{ states.media_player.play_1.attributes.media_content_id == "x-rincon-buzzer:0" }}'
      - condition: time
        after: '0:00:00'
        before: '8:00:00'
      - condition: state
        entity_id: light.linear_wd500z1_wall_dimmer_switch_level_3_0
        state: 'off'
  action:
    service: homeassistant.turn_on
    entity_id: light.linear_wd500z1_wall_dimmer_switch_level_3_0
    data:
      brightness: 100

All you need to do is change the entities to your own!

Let me know if this doesnโ€™t work for you, I can help you figure it out!

thank you for this tip and I believe I will start with this approach.

Unfortunately what cant be done is to execute actions before the alarm goes of. (like starting the heating in the bathroom)

But its an excellent starting point to get actions done after the alarm goes of