AutomationDataset/jianyu-li/automation-descriptions.json

54 lines
9.4 KiB
JSON

[
{
"id": "'Jarvis: Voice Timer Cancel'",
"result": {
"structured": "TRIGGER: When a voice command matches any of the following phrases: 'cancel timers', 'stop timers', 'delete timers', 'cancel all timers', 'stop all timers', 'delete all timers'. CONDITIONS: None. ACTIONS: Clear the value of jarvis timer data [input_text.jarvis_timer_data] and jarvis timer data 2 [input_text.jarvis_timer_data_2] to an empty string.",
"natural_language": {
"trigger": "When you say a specific voice command to cancel or stop timers, such as 'cancel timers', 'stop timers', 'delete timers', 'cancel all timers', 'stop all timers', or 'delete all timers'.",
"conditions": "There are no conditions that must be met for this automation to run.",
"action": "Clears the stored timer data by setting the text values of jarvis timer data [input_text.jarvis_timer_data] and jarvis timer data 2 [input_text.jarvis_timer_data_2] to empty."
},
"human_like": "Cancels all active Jarvis timers when you ask it to stop or delete them using your voice.",
"complexity": "low"
}
},
{
"id": "'Jarvis: Voice Timer Cancel Specific'",
"result": {
"structured": "TRIGGER: When a voice command is spoken matching any of the following phrases: 'cancel the timer', 'cancel the first timer', 'cancel first timer', 'cancel the second timer', 'cancel second timer', 'cancel the {label} timer', 'cancel {label} timer', 'stop the timer', 'stop first timer', 'stop second timer', 'stop the {label} timer', 'stop {label} timer'. CONDITIONS: None. ACTIONS: 1. Send the user's spoken sentence to a generative AI model to parse the intent and extract a timer index (1 or 2) and/or a label. 2. Set variables: parsed (the AI response), timer1_pairs (sorted_all attribute from jarvis timer [sensor.jarvis_timer]), timer2_pairs (sorted_all attribute from jarvis timer 2 [sensor.jarvis_timer_2]), timer1_labels (labels from timer1_pairs), timer2_labels (labels from timer2_pairs), timer1_has_label (true if parsed.label matches a label in timer1_labels, case-insensitive), timer2_has_label (true if parsed.label matches a label in timer2_labels, case-insensitive). 3. Execute a conditional choice: IF parsed.index equals 1 THEN run jarvis cancel timer 1 script [script.jarvis_cancel_timer_1]. ELSE IF parsed.index equals 2 THEN run jarvis cancel timer 2 script [script.jarvis_cancel_timer_2]. ELSE IF timer1_has_label is true THEN run jarvis cancel timer 1 script [script.jarvis_cancel_timer_1]. ELSE IF timer2_has_label is true THEN run jarvis cancel timer 2 script [script.jarvis_cancel_timer_2].",
"natural_language": {
"trigger": "When you speak a voice command to cancel a timer, such as 'cancel the timer', 'cancel the first timer', 'cancel the second timer', or 'cancel the {label} timer' (or similar phrases using 'stop' instead of 'cancel').",
"conditions": "There are no explicit conditions that must be met before the action runs; the automation proceeds immediately after the voice command is detected.",
"action": "First, the automation sends your spoken sentence to an AI model to figure out which timer you want to cancel, extracting a number (like 1 or 2) or a label if you mentioned one. It then checks the current timer data from jarvis timer [sensor.jarvis_timer] and jarvis timer 2 [sensor.jarvis_timer_2] to see which timers exist and what their labels are. Based on the parsed information, it will run the jarvis cancel timer 1 script [script.jarvis_cancel_timer_1] if you specified the first timer or a label that matches a timer on the first slot, or it will run the jarvis cancel timer 2 script [script.jarvis_cancel_timer_2] if you specified the second timer or a matching label on the second slot."
},
"human_like": "Lets you cancel a specific Jarvis timer by speaking a command, using AI to understand whether you mean the first timer, the second timer, or a timer with a specific label.",
"complexity": "medium"
}
},
{
"id": "'Jarvis: Voice Timer Request'",
"result": {
"structured": "TRIGGER: When a voice command matches one of the predefined phrases (e.g., 'set a timer', 'set a timer for {duration}', 'start a {label} timer for {duration}', etc.) via the conversation platform. CONDITIONS: None. ACTIONS: 1. Call the Google Generative AI service to extract timer duration and label from the voice command, storing the response in variable 'jarvis_timer_response'. 2. Parse the JSON response from the AI, cleaning the text and converting it to a dictionary stored in variable 'parsed'. 3. Calculate the timer duration in minutes (rounding up to the nearest whole minute) and generate a label (defaulting to '{minutes} Minute Timer' if none provided). Create a timer object with an ID, status, creation time, duration, trigger time, and label, stored as JSON in variable 'timer_obj'. 4. Choose where to save the timer: IF jarvis timer [sensor.jarvis_timer] is unknown OR unavailable, THEN save the timer object to jarvis timer data [input_text.jarvis_timer_data]. ELSE IF jarvis timer 2 [sensor.jarvis_timer_2] is unknown OR unavailable, THEN save the timer object to jarvis timer data 2 [input_text.jarvis_timer_data_2].",
"natural_language": {
"trigger": "When you give a voice command to set a timer, using phrases like 'set a timer', 'set a timer for 5 minutes', or 'start a pizza timer for 10 minutes'.",
"conditions": "There are no conditions that must be met for this automation to run.",
"action": "The automation first sends your spoken command to a Google AI (Gemini) to extract the timer duration and any label you mentioned. It then processes the AI's response, calculating the time in minutes (rounding up) and creating a default label if you didn't specify one. Finally, it creates a detailed timer object and saves it to the first available timer slot, checking if 'jarvis timer' [sensor.jarvis_timer] is free, and if not, checking 'jarvis timer 2' [sensor.jarvis_timer_2]."
},
"human_like": "Lets you set timers by voice command, using AI to understand the duration and label, and then saves the timer to the next available slot.",
"complexity": "medium"
}
},
{
"id": "'Notification: Jarvis Timer Done'",
"result": {
"structured": "TRIGGER: When jarvis timer [sensor.jarvis_timer] remains in state 'unknown' for 2 seconds OR When jarvis timer 2 [sensor.jarvis_timer_2] remains in state 'unknown' for 2 seconds. CONDITIONS: (mode [input_select.mode] is NOT 'Night') AND (jarvis timer data [input_text.jarvis_timer_data] is not blank AND not 'unknown' OR jarvis timer data 2 [input_text.jarvis_timer_data_2] is not blank AND not 'unknown'). ACTIONS: If triggered by jarvis timer [sensor.jarvis_timer], then: Set variable 'label' to the timerLabel from jarvis timer data [input_text.jarvis_timer_data] if it exists, otherwise 'Your timer'. Then, in parallel: Play timer end sound and speak '{{ label }} is done.' on kitchen homepod [media_player.kitchen_homepod], send a notification titled 'Timer Done' with message '{{ label }} has ended.' to your iphone notification [notify.mobile_app_your_iphone], and send the same notification to someoneelses iphone notification [notify.mobile_app_someoneelses_iphone]. Finally, clear jarvis timer data [input_text.jarvis_timer_data] by setting its value to ''. If triggered by jarvis timer 2 [sensor.jarvis_timer_2], then: Set variable 'label' to the timerLabel from jarvis timer data 2 [input_text.jarvis_timer_data_2] if it exists, otherwise 'Your timer'. Then, in parallel: Play timer end sound and speak '{{ label }} is done.' on kitchen homepod [media_player.kitchen_homepod], send a notification titled 'Timer Done' with message '{{ label }} has ended.' to your iphone notification [notify.mobile_app_your_iphone], and send the same notification to someoneelses iphone notification [notify.mobile_app_someoneelses_iphone]. Finally, clear jarvis timer data 2 [input_text.jarvis_timer_data_2] by setting its value to ''. After the chosen action sequence, wait for 5 minutes, then in parallel: Clear the timer_notification tag on your iphone notification [notify.mobile_app_your_iphone] and clear the timer_notification tag on someoneelses iphone notification [notify.mobile_app_someoneelses_iphone].",
"natural_language": {
"trigger": "The automation triggers when either the jarvis timer [sensor.jarvis_timer] or the jarvis timer 2 [sensor.jarvis_timer_2] has been in the 'unknown' state for two seconds.",
"conditions": "The automation only runs if the current mode [input_select.mode] is not set to 'Night'. Additionally, at least one of the timer data fields must contain valid information; either jarvis timer data [input_text.jarvis_timer_data] or jarvis timer data 2 [input_text.jarvis_timer_data_2] must not be empty or set to 'unknown'.",
"action": "Depending on which timer finished, the automation extracts a custom label from the corresponding data field, or uses a default label. It then announces the timer completion with a sound and voice message on the kitchen homepod [media_player.kitchen_homepod] and sends push notifications with a custom sound to two mobile phones. After sending the notifications, it clears the data field for the timer that finished. Finally, after a five-minute delay, it clears the sent notifications from both phones."
},
"human_like": "Announces and notifies when a Jarvis timer finishes, using a custom label if provided, and cleans up the notifications after five minutes.",
"complexity": "medium"
}
}
]