|
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." |
|
|