File size: 1,508 Bytes
f4955f4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
id: "check_alarm"
name: "Check My Alarm"
description: "Check the alarm time according to the weekday"
setup_steps: {
adb_call: { rotate: { orientation: PORTRAIT_0 } }
}
reset_steps: [
{ adb_call: { force_stop: { package_name: "com.google.android.deskclock" } } },
{
adb_call: {
start_activity: {
full_activity: "com.google.android.deskclock/com.android.deskclock.DeskClock"
}
}
success_condition: {
wait_for_app_screen: {
app_screen: {
activity: "com.google.android.deskclock/com.android.deskclock.DeskClock"
}
timeout_sec: 10.0
}
num_retries: 3
}
}
]
event_sources: {
response_event: {
mode: REGEX
pattern: "\\b0?7:30\\b|\\bseven thirty\\b|\\b(?:thirty|30|half) past (?:seven|7)\\b"
}
id: 1
}
event_sources: {
response_event: {
mode: REGEX
pattern: "\\b0?8:00\\b|\\beight (?:o'clock)\\b"
}
id: 2
}
event_slots: {
reward_listener: {
type: OR
id: 3
events: {
event: {
events: { id: 1 }
transformation: [
"import datetime",
"y = 1 if (datetime.datetime.today().weekday()+1)%7<5 else 0"
]
}
}
events: {
event: {
events: { id: 2 }
transformation: [
"import datetime",
"y = 1 if (datetime.datetime.today().weekday()+1)%7>=5 else 0"
]
}
}
}
episode_end_listener: {
events: { id: 3 }
transformation: "y = x==1"
}
}
command: "I have multiple alarms to wake me up in the morning."
command: "Please check my alarms and tell me when I should get up finally tomorrow morning."
|