# Turns on alarms on workdays and off on "not workdays"
  - alias: 'Turn on alarms soft wakeup'
    trigger:
      platform: time
      at: '20:05:00'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_1782
        
  - alias: 'Turn off alarms soft wakeup'
    trigger:
      platform: time
      at: '20:00:00'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_1782

  - alias: 'Turn on alarms Andreas'
    trigger:
      platform: time
      at: '20:05:10'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_445

  - alias: 'Turn off alarms Andreas'
    trigger:
      platform: time
      at: '20:00:10'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_445

  - alias: 'Turn on alarms Andreas Saturdays'
    trigger:
      platform: time
      at: '20:05:30'
    condition:
    - condition: or
      conditions:
        - condition: template
          value_template: '{{ now().date() | string != "2022-12-24" }}'
        - condition: template
          value_template: '{{ now().date() | string != "2022-12-31" }}'        
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_1874

  - alias: 'Turn off alarms Andreas Saturdays'
    trigger:
      platform: time
      at: '20:00:30'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_1874
            
  - alias: 'Turn on alarms Daniel'
    trigger:
      platform: time
      at: '20:05:40'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_377


  - alias: 'Turn off alarms Daniel'
    trigger:
      platform: time
      at: '20:00:40'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_377

  - alias: 'Turn on alarms Daniel Afsted'
    trigger:
      platform: time
      at: '20:07:10'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_1894


  - alias: 'Turn off alarms Daniel Afsted'
    trigger:
      platform: time
      at: '20:01:10'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_1894

  - alias: 'Turn on alarms Daniel Mondays and Fridays'
    trigger:
      platform: time
      at: '20:06:20'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_2273

  - alias: 'Turn off alarms Daniel Mondays and Fridays'
    trigger:
      platform: time
      at: '20:00:43'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_2273

  - alias: 'Turn on alarms Daniel Saturdays'
    trigger:
      platform: time
      at: '20:08:30'
    condition:
    - condition: or
      conditions:
        - condition: template
          value_template: '{{ now().date() | string != "2022-12-24" }}'
        - condition: template
          value_template: '{{ now().date() | string != "2022-12-31" }}'        
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_3471

  - alias: 'Turn off alarms Daniel Saturdays'
    trigger:
      platform: time
      at: '20:07:30'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_3471
            
        

  - alias: 'Turn on alarms Badeværelse'
    trigger:
      platform: time
      at: '20:06:00'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_298


  - alias: 'Turn off alarms Badeværelse'
    trigger:
      platform: time
      at: '20:01:00'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_298

  - alias: 'Turn on alarms Badeværelse Afsted'
    trigger:
      platform: time
      at: '20:07:10'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: switch.sonos_alarm_1899


  - alias: 'Turn off alarms Badeværelse Afsted'
    trigger:
      platform: time
      at: '20:06:20'
    condition:
      - condition: state
        entity_id: binary_sensor.arbejdsdagimorgen
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: switch.sonos_alarm_1899
