AutomationDataset/JeffRocchio/automation-descriptions.json

80 lines
12 KiB
JSON

[
{
"id": "Ambient Light | Set Quantize Values",
"result": {
"structured": "TRIGGER: Every 5 minutes (time pattern). CONDITIONS: None. ACTIONS: For each of two sensor/parameter sets: 1) ambient light sensor s2 bh1750 lux [sensor.ambient_light_sensor_s2_bh1750_lux] with thresholds ambient s2 quant night lux [input_number.ambient_s2_quant_night_lux], ambient s2 quant dark lux [input_number.ambient_s2_quant_dark_lux], ambient s2 quant dim lux [input_number.ambient_s2_quant_dim_lux] and output ambient s2 quantized [input_text.ambient_s2_quantized]; 2) adafruit feather sensors bh1750 illuminance [sensor.adafruit_feather_sensors_bh1750_illuminance] with thresholds ambient s1 quant night lux [input_number.ambient_s1_quant_night_lux], ambient s1 quant dark lux [input_number.ambient_s1_quant_dark_lux], ambient s1 quant dim lux [input_number.ambient_s1_quant_dim_lux] and output ambient s1 quantized [input_text.ambient_s1_quantized]. For each set: If the sensor lux value is greater than the night threshold AND less than the dark threshold, set the output text to 'Dark'. Else if the sensor lux value is greater than the dark threshold AND less than the dim threshold, set the output text to 'Dim'. Else if the sensor lux value is greater than the dim threshold, set the output text to 'Bright'. Otherwise (default), set the output text to 'Night'.",
"natural_language": {
"trigger": "The automation runs every five minutes.",
"conditions": "There are no conditions.",
"action": "For each of two ambient light sensors, the automation reads the current lux value and compares it against three user-defined threshold values (night, dark, and dim). Based on which range the lux value falls into, it updates a corresponding text entity with a descriptive label: 'Dark', 'Dim', 'Bright', or 'Night'. The first sensor processed is ambient light sensor s2 bh1750 lux [sensor.ambient_light_sensor_s2_bh1750_lux], and the second is adafruit feather sensors bh1750 illuminance [sensor.adafruit_feather_sensors_bh1750_illuminance]."
},
"human_like": "Converts raw light sensor readings into simple text categories (like Bright or Dark) every five minutes for use in other automations.",
"complexity": "medium"
}
},
{
"id": "Ambient Sensors | State Changed",
"result": {
"structured": "TRIGGER: When ambient s9 quantized [input_text.ambient_s9_quantized] OR ambient s1 quantized [input_text.ambient_s1_quantized] OR ambient s2 quantized [input_text.ambient_s2_quantized] changes state. CONDITIONS: None. ACTIONS: Define variables: sensor_label_helper maps the triggering entity to its corresponding lightset label entity (ambient s9 quantized [input_text.ambient_s9_quantized] -> ambient s9 lightset label [input_text.ambient_s9_lightset_label], ambient s1 quantized [input_text.ambient_s1_quantized] -> ambient s1 lightset label [input_text.ambient_s1_lightset_label], ambient s2 quantized [input_text.ambient_s2_quantized] -> ambient s2 lightset label [input_text.ambient_s2_lightset_label]), and lightset_label is set to the state of that mapped entity (or 'NoLightsetLabel' if unavailable). Log a debug message with these variable values. Then, start the script lightset assess conditions script [script.lightset_assess_conditions] with the variable lightset_label.",
"natural_language": {
"trigger": "When the state of any of the ambient light sensors (ambient s9 quantized [input_text.ambient_s9_quantized], ambient s1 quantized [input_text.ambient_s1_quantized], or ambient s2 quantized [input_text.ambient_s2_quantized]) changes.",
"conditions": "There are no conditions for this automation.",
"action": "The automation first determines which sensor changed and looks up its associated label entity (e.g., if ambient s9 quantized changed, it uses ambient s9 lightset label [input_text.ambient_s9_lightset_label]). It then logs a debug message showing the internal variables. Finally, it runs the lightset assess conditions script [script.lightset_assess_conditions], passing it the retrieved label to assess lighting conditions."
},
"human_like": "When an ambient light sensor reports a new value, it triggers a script to evaluate and potentially adjust the lighting conditions for the corresponding area.",
"complexity": "medium"
}
},
{
"id": "Light Set - Lset App Test Light Set | Deactivate Requested",
"result": {
"structured": "TRIGGER: When light set lset app test light set deactivate button [input_button.light_set_lset_app_test_light_set_deactivate] is pressed OR when light set lset app test light set disable button [input_button.light_set_lset_app_test_light_set_disable] is pressed. CONDITIONS: None. ACTIONS: Set variables: target_lightset_label and target_exit_state based on which button was pressed, then run script lightset deactivate disable script [script.lightset_deactivate_disable] with those variables.",
"natural_language": {
"trigger": "When either the 'light set lset app test light set deactivate button' [input_button.light_set_lset_app_test_light_set_deactivate] or the 'light set lset app test light set disable button' [input_button.light_set_lset_app_test_light_set_disable] is pressed.",
"conditions": "There are no conditions for this automation.",
"action": "The automation determines which button was pressed and sets a target label and exit state accordingly. It then runs the 'lightset deactivate disable script' [script.lightset_deactivate_disable] with these variables to handle the deactivation or disabling of the specified light set."
},
"human_like": "Deactivates or disables the 'Lset App Test Light Set' when its corresponding buttons are pressed.",
"complexity": "medium"
}
},
{
"id": "lightset | State Changed",
"result": {
"structured": "TRIGGER: When the state of lightset test set state [input_select.lightset_test_set_state] OR lightset kitchen state [input_select.lightset_kitchen_state] OR lightset living area state [input_select.lightset_living_area_state] changes. CONDITIONS: None. ACTIONS: Define variables mapping the triggering entity to its corresponding lightset label and operational state helper. Log a debug message with the variables and state values. Execute the script lightset set state indicators script [script.lightset_set_state_indicators] with the changed helper and new state. Then, based on the new state value, choose one of the following cases: CASE-0: If the new state is 'In Process - ON', execute the script lightset on by label script [script.lightset_on_by_label] with the lightset label. CASE-1: If the new state is 'Pending - OFF', execute the script lightset goto pending off script [script.lightset_goto_pending_off] with the lightset label. CASE-2: If the new state is 'In Process - OFF', execute the script lightset off by areas script [script.lightset_off_by_areas] with the lightset label. CASE-3: If the new state is 'Cancel In Process', execute the script lightset cancel script [script.lightset_cancel] with the lightset label. CASE-4: If the new state is 'Inactive' AND the previous state was 'Cancel In Process', set the operational state helper (determined from the trigger map) to the option 'Activate'.",
"natural_language": {
"trigger": "When the state of any of the three light-set state selectors (lightset test set state [input_select.lightset_test_set_state], lightset kitchen state [input_select.lightset_kitchen_state], or lightset living area state [input_select.lightset_living_area_state]) changes.",
"conditions": "There are no conditions that must be met for the actions to run.",
"action": "First, the automation sets up internal variables to identify which specific light-set was triggered and its associated operational state helper. It then logs a debug message for troubleshooting. Next, it runs a script to update LED indicators based on the new state. Finally, it routes the action based on the exact new state value: turning the light-set on if the state is 'In Process - ON', starting a delay timer for turning off if the state is 'Pending - OFF', turning the light-set off if the state is 'In Process - OFF', cancelling any active process if the state is 'Cancel In Process', or, if the state changes specifically from 'Cancel In Process' to 'Inactive', it sets that light-set's operational state to 'Activate'."
},
"human_like": "This automation manages the behavior of light-sets by reacting to state changes, triggering appropriate actions like turning lights on or off, starting timers, or updating operational status.",
"complexity": "medium"
}
},
{
"id": "lightset | Transition Timer Expired",
"result": {
"structured": "TRIGGER: When any of the timers lightset test set timer [timer.lightset_test_set_timer], lightset kitchen timer [timer.lightset_kitchen_timer], or lightset living area timer [timer.lightset_living_area_timer] changes state to idle. CONDITIONS: None. ACTIONS: First, set variables: trigger_map (a lookup table mapping timer entities to their label and state helper), timer_to_act_on (the triggering timer entity if it exists in trigger_map, otherwise 'NoMappedTimer'), target_lightset_label (the label from trigger_map for timer_to_act_on), and target_state_helper (the state helper from trigger_map for timer_to_act_on). Second, log debug information showing the variables and trigger state. Third, if timer_to_act_on is not 'NoMappedTimer', call the script lightset assess conditions script [script.lightset_assess_conditions] with the variable lightset_label set to target_lightset_label. Otherwise, if timer_to_act_on is 'NoMappedTimer', log an error message indicating the triggering timer has no entry in the trigger_map lookup table.",
"natural_language": {
"trigger": "When any of the timers for the light-sets (lightset test set timer [timer.lightset_test_set_timer], lightset kitchen timer [timer.lightset_kitchen_timer], or lightset living area timer [timer.lightset_living_area_timer]) finishes and enters the idle state.",
"conditions": "There are no conditions that must be met for the automation to proceed.",
"action": "The automation first sets up internal variables to identify which timer finished and maps it to a corresponding label and state helper. It then logs these details for debugging. If the timer that finished is recognized in its internal map, it triggers the 'lightset assess conditions script' [script.lightset_assess_conditions] to evaluate what to do next for that specific light-set. If the timer is not recognized, it logs an error to the logbook."
},
"human_like": "When a light-set's transition timer finishes, this automation identifies which set it is and runs a script to decide the next action, or logs an error if the timer is unknown.",
"complexity": "medium"
}
},
{
"id": "Away Random Lights by Label",
"result": {
"structured": "TRIGGER: Every 5 minutes (time pattern). CONDITIONS: away from home [input_boolean.away_from_home] is on AND daypart sensor [sensor.daypart] is in state 'nighttime' AND the current time is earlier than the time set in bedtime normal [input_datetime.bedtime_normal] AND a random check (1 in 5 chance) passes. ACTIONS: If the list of lights with label 'Light Set - Night Random' is not empty, randomly select one light from that list and toggle it.",
"natural_language": {
"trigger": "The automation runs every 5 minutes.",
"conditions": "The automation requires that the away from home [input_boolean.away_from_home] mode is active, the daypart sensor [sensor.daypart] reports it is nighttime, the current time is before the bedtime set in bedtime normal [input_datetime.bedtime_normal], and a random 20% chance condition is met.",
"action": "If there are any lights tagged with the label 'Light Set - Night Random', one of them is randomly selected and toggled on or off."
},
"human_like": "When you're away at night, this automation randomly toggles a light from a specific set every few minutes to simulate activity, but only before your normal bedtime.",
"complexity": "medium"
}
}
]