https://pastein.ru/t/zV

  скопируйте уникальную ссылку для отправки

Загрузка данных


	switch now.getDayOfWeek {
				  case 1: if (AlarmClockOnMonday_Switch == OFF) return
				  case 2: if (AlarmClockOnTuesday_Switch == OFF) return
				  case 3: if (AlarmClockOnWednesday_Switch == OFF) return
				  case 4: if (AlarmClockOnThursday_Switch == OFF) return
				  case 5: if (AlarmClockOnFriday_Switch == OFF) return
				  case 6: if (AlarmClockOnSaturday_Switch == OFF) return
				  case 7: if (AlarmClockOnSunday_Switch == OFF) return
	}

	var Mi = 0;
	if (now.getDayOfWeek <= 5) {
	   Mi = WeekdaysAlarmClockStartHour.state as Number * 60 + WeekdaysAlarmClockStartMinute.state as Number }
	else   
	   Mi = WeekendAlarmClockStartHour.state as Number * 60 + WeekendAlarmClockStartMinute.state as Number
    Mi -= WakeUpInterval

    if (Mi !== now.getMinuteOfDay) return

    // Let's ALARM!