script:
  routine_leaving_home:
    alias: Routine · Leaving home
    sequence:
      - service: switch.turn_off
        entity_id: switch.mercury_home_mode

      - service: homeassistant.turn_off
        entity_id:
          - input_boolean.georgi_home
          - media_player.nvidia_shield
          - media_player.living_room_tv
          - light.all
          - climate.toshiba_ac
          - group.all_radiators
          - fan.philips_airpurifier

      - service: media_player.media_stop
        entity_id: group.all_sonos
      - service: script.dashboards_light_down
      - service: input_select.select_option
        entity_id: input_select.hallway_dashboard_mode
        data:
          option: "Coming Home"

      - service: cover.close_cover
        entity_id: cover.living_room

      - service: notify.telegram
        data:
          title: "🏠 *Presence Module · Leaving Home*"
          message: "I see you're leaving. Goodbye!"
