Skip to content

Example Wake up call

ggodart edited this page Jan 11, 2021 · 1 revision

Example of how to wake up somebody

WARNING: This example has not been verified

if (said $v_wakeup_parents) {
    $sleeping_parents = 0;
    &pa_sleep_mode('all', 0);
    speak("rooms=all Good morning everybody.  It is now $Time_Now on $Date_Now.");
    speak("rooms=all The outside temperature is " . convert_k2f((state $temp_outside)/10) . "degrees");
    speak("rooms=all Sunrise today is at $Time_Sunrise, sunset is at $Time_Sunset");
    readit("\\house\c\data\weather_conditions.txt");
    readit("-rooms bedroom //house/c/homepage/mail/mail.txt");

    set $left_bedroom_light ON;
    set $right_bedroom_light ON;

    runit("min", "ir_cmd TV,POWER,5,1");

    &curtain_on('bedroom', 'open');
}
Clone this wiki locally