7-day - Scheduled Mode Change

Could anyone help me modify the “Scheduled Mode Change” app so it allows one to set a mode change based on a 7-day schedule and specific time?

I modified the code slightly but it seems to ignore the actual set day and triggers everyday at the specified time.

// Automatically generated. Make future change here.
    name: "test",
    namespace: "",
    author: "V. B",
    description: "test",
    category: "My Apps",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png")

preferences {
    section("Configuration") {
        input "dayOfWeek", "enum",
                        title: "Which day of the week?",
                        multiple: false,
                        metadata: [
                    values: [
                    'All Week',
                    'Monday to Friday',
                    'Saturday & Sunday',
        input "time", "time", title: "At this time"
        //input "newMode", "mode", title: "Change to this mode"
        section("Change to this mode") {
        input "newMode", "mode", title: "Mode?"

def installed() {

def updated() {

def initialize() {
    schedule(time, changeMode)

def changeMode() {
    if (location.mode != newMode) {
        if (location.modes?.find{it.name == newMode}) {
            send "${label} has changed the mode to '${newMode}'"
        else {
            send "${label} tried to change to undefined mode '${newMode}'"

private send(msg) {
    sendPush msg
    log.debug msg

private getLabel() {
    app.label ?: "SmartThings"

I don’t think you need to write an app for that. You can schedule “Hello Home” actions to run at specific time and days of week. And Hello Home action can be set up to change mode.

You are absolutely correct, it can be achieved via the Hello mode setting. Thank you!