AutomationDataset/topaniot/automation-descriptions.json

301 lines
46 KiB
JSON

[
{
"id": "asuswrt_cpu_temp",
"result": {
"structured": "TRIGGER: When Asuswrt CPU Temperature [sensor.asuswrt_cpu_temperature] exceeds 80°C. CONDITIONS: None. ACTIONS: Send a notification via a dynamically selected notification service (Notify Service Server [input_text.notify_service_server] if defined, otherwise Notify Service [input_text.notify_service] if defined, otherwise default 'notify.notify') with a message indicating high temperature. Then wait until Asuswrt CPU Temperature [sensor.asuswrt_cpu_temperature] drops below 75°C. Then send another notification via the same dynamic service selection with a message indicating normal temperature.",
"natural_language": {
"trigger": "When the Asuswrt CPU Temperature [sensor.asuswrt_cpu_temperature] rises above 80 degrees Celsius.",
"conditions": "There are no conditions that must be met.",
"action": "First, send a notification using a notification service determined by checking if Notify Service Server [input_text.notify_service_server] is defined, then Notify Service [input_text.notify_service], and finally a default service. The message reports the current high temperature. Then, the automation waits for the CPU temperature to fall below 75 degrees Celsius. Once it does, it sends a second notification using the same service selection logic, reporting that the temperature has returned to a normal level."
},
"human_like": "Sends alerts when the router's CPU temperature gets too high, and then sends an all-clear notification once it cools down.",
"complexity": "medium"
}
},
{
"id": "asuswrt_24ghz_temp",
"result": {
"structured": "TRIGGER: When Asuswrt 2.4GHz Temperature [sensor.asuswrt_2_4ghz_temperature] is above 60°C. CONDITIONS: None. ACTIONS: Send a notification via a dynamically selected notification service (Notify Service Server [input_text.notify_service_server] if defined, else Notify Service [input_text.notify_service] if defined, else the default 'notify.notify') with a message indicating the high temperature. Then wait until Asuswrt 2.4GHz Temperature [sensor.asuswrt_2_4ghz_temperature] is below 55°C. Then send another notification via the same dynamic service selection with a message indicating the temperature has dropped.",
"natural_language": {
"trigger": "When the Asuswrt 2.4GHz Temperature [sensor.asuswrt_2_4ghz_temperature] rises above 60°C.",
"conditions": "There are no conditions that must be met.",
"action": "Sends a notification using a priority-based service selection. It first checks if Notify Service Server [input_text.notify_service_server] is defined, then Notify Service [input_text.notify_service], and finally uses a default service. The notification message reports the current high temperature. The automation then pauses, waiting for the temperature to fall below 55°C. Once it does, it sends a second notification using the same service selection logic to report that the temperature has returned to a safe level."
},
"human_like": "Monitors the router's 2.4GHz radio temperature, sending an alert when it gets too hot and another when it cools down.",
"complexity": "medium"
}
},
{
"id": "asuswrt_5ghz_temp",
"result": {
"structured": "TRIGGER: When Asuswrt 5GHz Temperature [sensor.asuswrt_5ghz_temperature] exceeds 60°C. CONDITIONS: None. ACTIONS: Send a notification via the dynamically selected notification service (Notify Service Server [input_text.notify_service_server] if defined, otherwise Notify Service [input_text.notify_service] if defined, otherwise the default notify.notify) with a message indicating the high temperature. Then wait until Asuswrt 5GHz Temperature [sensor.asuswrt_5ghz_temperature] drops below 55°C. Finally, send another notification via the same dynamic service selection with a message indicating the temperature has returned to a normal level.",
"natural_language": {
"trigger": "When the temperature sensor for the Asuswrt 5GHz radio [sensor.asuswrt_5ghz_temperature] reports a value above 60 degrees Celsius.",
"conditions": "There are no conditions that must be met.",
"action": "First, a notification is sent. The notification service is chosen based on available configuration: it uses the Notify Service Server [input_text.notify_service_server] if it exists, otherwise the Notify Service [input_text.notify_service], and if neither exists, it falls back to the default notification service. The message reports the current high temperature. The automation then pauses, waiting for the temperature to drop below 55°C. Once that happens, a second notification is sent using the same logic to select the notification service, reporting that the temperature has returned to a safe level."
},
"human_like": "Monitors the 5GHz radio temperature on the Asus router and sends alerts when it gets too hot, followed by an all-clear when it cools down.",
"complexity": "medium"
}
},
{
"id": "low_batteries",
"result": {
"structured": "TRIGGER: When Low Batteries [sensor.low_batteries] changes to null OR when Low Batteries Offset [sensor.low_batteries_offset] changes to null OR when Home Assistant starts. CONDITIONS: Low Batteries [sensor.low_batteries] state is defined AND Low Batteries Offset [sensor.low_batteries_offset] state is defined. ACTIONS: Wait 1 second, then choose: IF (Low Batteries [sensor.low_batteries] is between 1 and 2 (exclusive) AND (Low Batteries Last Triggered [input_number.low_batteries_last_triggered] is less than Low Batteries [sensor.low_batteries] OR (Low Batteries Last Triggered [input_number.low_batteries_last_triggered] is greater than Low Batteries [sensor.low_batteries] AND Low Batteries [sensor.low_batteries] equals Low Batteries Offset [sensor.low_batteries_offset]))) THEN wait for a configurable delay (from Delay Notify Batteries [input_number.delay_notify_batteries] or default 10 minutes), send a notification to a configurable service (from Notify Service Batteries [input_text.notify_service_batteries], Notify Service [input_text.notify_service], or default notify.notify) with a message listing the single low battery device, and set Low Batteries Last Triggered [input_number.low_batteries_last_triggered] to the current Low Batteries [sensor.low_batteries] value. ELSE IF (Low Batteries [sensor.low_batteries] is greater than 1 AND (Low Batteries Last Triggered [input_number.low_batteries_last_triggered] is less than Low Batteries [sensor.low_batteries] OR (Low Batteries Last Triggered [input_number.low_batteries_last_triggered] is greater than Low Batteries [sensor.low_batteries] AND Low Batteries [sensor.low_batteries] equals Low Batteries Offset [sensor.low_batteries_offset]))) THEN wait for a configurable delay (from Delay Notify Batteries [input_number.delay_notify_batteries] or default 10 minutes), send a notification to a configurable service (from Notify Service Batteries [input_text.notify_service_batteries], Notify Service [input_text.notify_service], or default notify.notify) with a message listing the multiple low battery devices, and set Low Batteries Last Triggered [input_number.low_batteries_last_triggered] to the current Low Batteries [sensor.low_batteries] value. ELSE IF (Low Batteries Offset [sensor.low_batteries_offset] is less than 1 AND Low Batteries Last Triggered [input_number.low_batteries_last_triggered] does not equal Low Batteries [sensor.low_batteries]) THEN send a notification to a configurable service (from Notify Service Batteries [input_text.notify_service_batteries], Notify Service [input_text.notify_service], or default notify.notify) with a good battery status message, and set Low Batteries Last Triggered [input_number.low_batteries_last_triggered] to the current Low Batteries [sensor.low_batteries] value. ELSE do nothing.",
"natural_language": {
"trigger": "This automation runs when the Low Batteries [sensor.low_batteries] sensor changes to a null state, when the Low Batteries Offset [sensor.low_batteries_offset] sensor changes to a null state, or when Home Assistant starts up.",
"conditions": "It only proceeds if both the Low Batteries [sensor.low_batteries] and Low Batteries Offset [sensor.low_batteries_offset] sensors have a defined state.",
"action": "After a one-second delay, it checks several scenarios. If there is exactly one low battery device and the notification hasn't been sent for this new count (or the count has decreased but matches a baseline offset), it waits a configurable time (from Delay Notify Batteries [input_number.delay_notify_batteries] or 10 minutes by default) and sends a notification listing that single device. If there are two or more low battery devices and the notification hasn't been sent for this new count (or the count has decreased but matches a baseline offset), it waits the same configurable delay and sends a notification listing all devices. If the baseline offset indicates no low batteries, but the last triggered count differs from the current count, it immediately sends an 'all good' notification. In all notification cases, it updates the Low Batteries Last Triggered [input_number.low_batteries_last_triggered] to remember the current count. The notification service used is configurable via Notify Service Batteries [input_text.notify_service_batteries], Notify Service [input_text.notify_service], or a default."
},
"human_like": "Sends smart notifications about low battery devices, with configurable delays and service selection, to avoid spamming alerts when counts fluctuate.",
"complexity": "high"
}
},
{
"id": "restart_nginx_addon",
"result": {
"structured": "TRIGGER: At 05:00:00. CONDITIONS: Day is Friday. ACTIONS: If Nginx SSL Proxy Update [update.nginx_home_assistant_ssl_proxy_update] is defined, then restart the Home Assistant addon 'core_nginx_proxy'.",
"natural_language": {
"trigger": "The automation triggers every day at 5:00 AM.",
"conditions": "The automation only runs if the current day is a Friday.",
"action": "If the Nginx SSL Proxy Update [update.nginx_home_assistant_ssl_proxy_update] entity exists, then the 'core_nginx_proxy' Home Assistant addon is restarted."
},
"human_like": "Restarts the Nginx proxy addon every Friday morning at 5 AM, but only if the update entity for it exists.",
"complexity": "low"
}
},
{
"id": "problems_detected",
"result": {
"structured": "TRIGGER: When Problems Detected [sensor.problems_detected] changes state OR When Home Assistant starts OR When Maintenance Mode [input_boolean.maintenance_mode] turns off. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off AND Problems Detected [sensor.problems_detected] state is defined. ACTIONS: Choose based on the number of problems: (IF Problems Detected [sensor.problems_detected] is above 0 AND below 2 AND Problems Detected Last Triggered [input_number.problems_detected_last_triggered] value is different from Problems Detected [sensor.problems_detected] value THEN wait for a delay (from Delay Notify Problems [input_number.delay_notify_problems] or default 10 minutes), set Problems Detected Last Triggered [input_number.problems_detected_last_triggered] to the current problem count, and send a notification via Notify Service Problems [input_text.notify_service_problems] or Notify Service [input_text.notify_service] or default notify.notify with a message listing the single problem) OR (IF Problems Detected [sensor.problems_detected] is above 1 AND Problems Detected Last Triggered [input_number.problems_detected_last_triggered] value is different from Problems Detected [sensor.problems_detected] value THEN wait for a delay (from Delay Notify Problems [input_number.delay_notify_problems] or default 10 minutes), set Problems Detected Last Triggered [input_number.problems_detected_last_triggered] to the current problem count, and send a notification via Notify Service Problems [input_text.notify_service_problems] or Notify Service [input_text.notify_service] or default notify.notify with a message listing all problems) OR (IF Problems Detected [sensor.problems_detected] is below 1 AND Problems Detected Last Triggered [input_number.problems_detected_last_triggered] value is greater than 0 THEN send a notification via Notify Service Problems [input_text.notify_service_problems] or Notify Service [input_text.notify_service] or default notify.notify with a 'problems resolved' message and set Problems Detected Last Triggered [input_number.problems_detected_last_triggered] to 0).",
"natural_language": {
"trigger": "The automation triggers when the Problems Detected [sensor.problems_detected] sensor changes its state, when Home Assistant starts up, or when the Maintenance Mode [input_boolean.maintenance_mode] is turned off.",
"conditions": "The automation only runs if Maintenance Mode [input_boolean.maintenance_mode] is currently off and the Problems Detected [sensor.problems_detected] sensor has a defined state.",
"action": "Depending on the number of detected problems, the automation performs different actions. If there is exactly one problem and the count has changed since the last notification, it waits for a configurable delay (default 10 minutes), records the new count, and sends a notification listing the single problem. If there are two or more problems and the count has changed, it waits for the same delay, records the new count, and sends a notification listing all problems. If the problem count drops to zero after previously being higher, it immediately sends a 'problems resolved' notification and resets the recorded count. The notification service used is determined by a priority list: first Notify Service Problems [input_text.notify_service_problems], then Notify Service [input_text.notify_service], with a fallback to the default notify.notify service."
},
"human_like": "Sends notifications about system problems, with different messages for a single problem, multiple problems, or when all problems are resolved, and includes a delay to avoid spamming.",
"complexity": "high"
}
},
{
"id": "cpu_temp",
"result": {
"structured": "TRIGGER: When Processor Temperature [sensor.processor_temperature] rises above 80°C. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off. ACTIONS: Send a notification via the determined notification service (prioritising Notify Service Server [input_text.notify_service_server], then Notify Service [input_text.notify_service], then default 'notify.notify') with a message indicating high CPU temperature. Wait until Processor Temperature [sensor.processor_temperature] drops below 70°C. Then, send a second notification via the same determined service with a message indicating normal CPU temperature.",
"natural_language": {
"trigger": "When the Processor Temperature [sensor.processor_temperature] sensor reports a value above 80 degrees Celsius.",
"conditions": "The automation only runs if the Maintenance Mode [input_boolean.maintenance_mode] is turned off.",
"action": "First, a notification is sent. The notification service is chosen based on available input_text entities: if Notify Service Server [input_text.notify_service_server] is defined, it uses its value; otherwise, it tries Notify Service [input_text.notify_service]; if neither is defined, it uses the default 'notify.notify'. The notification message reports the current high CPU temperature. The automation then pauses and waits for the Processor Temperature [sensor.processor_temperature] to fall below 70 degrees Celsius. Once that happens, a second notification is sent using the same determined service, reporting that the CPU temperature has returned to a normal level."
},
"human_like": "Sends alerts when the server's CPU temperature gets too high, and sends a follow-up alert once it cools down, but only when maintenance mode is off.",
"complexity": "medium"
}
},
{
"id": "update_on_server_stop",
"result": {
"structured": "TRIGGER: When Home Assistant is shutting down OR when a webhook with ID 'secret update_packages_webhook' is received via PUT. CONDITIONS: None. ACTIONS: Run Update Packages Script [script.update_packages] and then wait for 10 seconds.",
"natural_language": {
"trigger": "The automation is triggered either when the Home Assistant system begins to shut down, or when a specific webhook (with the ID 'secret update_packages_webhook') is called using the PUT method.",
"conditions": "There are no conditions that must be met for the automation to proceed.",
"action": "It starts the Update Packages Script [script.update_packages] and then pauses for 10 seconds."
},
"human_like": "Runs a package update script either when Home Assistant is shutting down or when triggered by a specific webhook.",
"complexity": "low"
}
},
{
"id": "server_start",
"result": {
"structured": "TRIGGER: When Home Assistant starts. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off. ACTIONS: Send a notification with the message '▶️ Serverul a pornit' using the notification service determined by the following logic: If Notify Service Server [input_text.notify_service_server] is defined, use its state value; otherwise, if Notify Service [input_text.notify_service] is defined, use its state value; otherwise, use the default service 'notify.notify'.",
"natural_language": {
"trigger": "When the Home Assistant server starts up.",
"conditions": "The Maintenance Mode [input_boolean.maintenance_mode] must be turned off.",
"action": "Sends a notification with the message '▶️ Serverul a pornit' (The server has started). The notification service to use is chosen based on available configuration: it first tries to use the value from Notify Service Server [input_text.notify_service_server], if that entity exists. If not, it tries the value from Notify Service [input_text.notify_service]. If neither exists, it uses the default service 'notify.notify'."
},
"human_like": "Sends a notification when the Home Assistant server starts, but only if maintenance mode is not active.",
"complexity": "medium"
}
},
{
"id": "server_stop",
"result": {
"structured": "TRIGGER: When Home Assistant is shutting down. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off. ACTIONS: Send a notification with the message '⏹️ Serverul s-a oprit' using the notification service determined by the following logic: If Notify Service Server [input_text.notify_service_server] is defined, use its state value; otherwise, if Notify Service [input_text.notify_service] is defined, use its state value; otherwise, use the default service 'notify.notify'.",
"natural_language": {
"trigger": "When Home Assistant begins its shutdown process.",
"conditions": "The Maintenance Mode [input_boolean.maintenance_mode] must be turned off.",
"action": "Sends a notification with the message '⏹️ Serverul s-a oprit'. The notification service is chosen dynamically: it first checks the value of Notify Service Server [input_text.notify_service_server]; if that's not available, it checks Notify Service [input_text.notify_service]; if neither is available, it uses the default service 'notify.notify'."
},
"human_like": "Sends a notification when the Home Assistant server is shutting down, but only if maintenance mode is not active.",
"complexity": "medium"
}
},
{
"id": "healthchecks_update",
"result": {
"structured": "TRIGGER: When the time pattern matches every 1 minute. CONDITIONS: None. ACTIONS: Execute the REST command healthchecks [rest_command.healthchecks].",
"natural_language": {
"trigger": "The automation runs every minute.",
"conditions": "There are no conditions.",
"action": "Calls the REST command named healthchecks [rest_command.healthchecks]."
},
"human_like": "Runs a health check command every minute to ensure the system is operational.",
"complexity": "low"
}
},
{
"id": "failed_notification",
"result": {
"structured": "TRIGGER: When a system log event with level ERROR occurs. CONDITIONS: The event message contains the text 'Error sending message'. ACTIONS: Create a persistent notification with title 'Nu s-a putut trimite notificarea' and message 'A apărut o problemă la trimiterea unei notificari. Anunță echipa tehnică' followed by the event message.",
"natural_language": {
"trigger": "When an error event is logged by the system.",
"conditions": "The error message must contain the phrase 'Error sending message'.",
"action": "Creates a persistent notification to alert the user that a notification could not be sent, instructing them to notify the technical team, and includes the full error message for details."
},
"human_like": "Alerts the user when the system fails to send a notification by creating a visible error message.",
"complexity": "low"
}
},
{
"id": "update_packages",
"result": {
"structured": "TRIGGER: When Update Packages Script [script.update_packages] changes from on to off. CONDITIONS: None. ACTIONS: Wait for 10 seconds, then reload all Home Assistant core entities and integrations.",
"natural_language": {
"trigger": "When the Update Packages Script [script.update_packages] finishes running, transitioning from an 'on' state to an 'off' state.",
"conditions": "There are no conditions that must be met.",
"action": "After a 10-second delay, the automation triggers a full reload of all Home Assistant core entities and integrations."
},
"human_like": "Reloads all Home Assistant integrations 10 seconds after the package update script finishes running.",
"complexity": "low"
}
},
{
"id": "cpu_load_15m",
"result": {
"structured": "TRIGGER: When Load 15m [sensor.load_15m] is above 10. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off. ACTIONS: 1. Send a notification via the determined notification service (using Notify Service Server [input_text.notify_service_server] if defined, else Notify Service [input_text.notify_service] if defined, else default 'notify.notify') with message '🟡 CPU Load (15m) = [current load value]'. 2. Wait until Load 15m [sensor.load_15m] is below 4. 3. Send a second notification via the same determined service logic with message '🟢 CPU Load (15m) = [current load value]'.",
"natural_language": {
"trigger": "When the Load 15m [sensor.load_15m] sensor reports a value greater than 10.",
"conditions": "The automation only runs if Maintenance Mode [input_boolean.maintenance_mode] is turned off.",
"action": "First, it sends a warning notification about the high CPU load. The notification service is chosen based on the state of Notify Service Server [input_text.notify_service_server] or Notify Service [input_text.notify_service]; if neither is defined, it uses a default service. The notification message includes the current load value. Then, the automation pauses and waits for the load to drop below 4. Once that happens, it sends a second, all-clear notification using the same method to report the recovered load value."
},
"human_like": "Sends alerts when the 15-minute CPU load is high, and sends a follow-up when it returns to normal, but only when maintenance mode is off.",
"complexity": "medium"
}
},
{
"id": "ram_usage",
"result": {
"structured": "TRIGGER: When Memory Use Percent [sensor.memory_use_percent] is above 90%. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off. ACTIONS: Send a notification via a dynamically determined service (Notify Service Server [input_text.notify_service_server] if defined, otherwise Notify Service [input_text.notify_service] if defined, otherwise the default notify.notify) with a message indicating high RAM usage. Wait until Memory Use Percent [sensor.memory_use_percent] drops below 80%. Send a second notification via the same dynamically determined service with a message indicating normal RAM usage.",
"natural_language": {
"trigger": "When the Memory Use Percent [sensor.memory_use_percent] sensor reports a value greater than 90%.",
"conditions": "The Maintenance Mode [input_boolean.maintenance_mode] switch must be turned off.",
"action": "First, a notification is sent. The notification service is chosen dynamically: it uses the Notify Service Server [input_text.notify_service_server] if it exists, otherwise the Notify Service [input_text.notify_service], and if neither exists, it falls back to the default 'notify.notify' service. The message reports the current high RAM percentage. The automation then waits for the Memory Use Percent [sensor.memory_use_percent] to fall below 80%. Once that happens, a second notification is sent using the same logic to determine the service, this time reporting that RAM usage has returned to a normal level."
},
"human_like": "Sends alerts when server RAM usage is critically high and again when it returns to a safe level, but only when maintenance mode is off.",
"complexity": "medium"
}
},
{
"id": "disk_usage",
"result": {
"structured": "TRIGGER: When Disk Use Percent [sensor.disk_use_percent] is above 70%. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off. ACTIONS: 1. Send a notification via a dynamically selected notification service (prioritizing Notify Service Server [input_text.notify_service_server], then Notify Service [input_text.notify_service], then default notify.notify) with a message containing the current disk usage percentage. 2. Wait until Disk Use Percent [sensor.disk_use_percent] falls below 60%. 3. Send a second notification via the same dynamic service selection with a message containing the current disk usage percentage.",
"natural_language": {
"trigger": "When the Disk Use Percent [sensor.disk_use_percent] sensor reports a value greater than 70%.",
"conditions": "The automation only runs if Maintenance Mode [input_boolean.maintenance_mode] is turned off.",
"action": "First, it sends a yellow-circle warning notification using a specific notification service. The service is chosen by checking if Notify Service Server [input_text.notify_service_server] is defined, then Notify Service [input_text.notify_service], and finally defaulting to the standard notify service. The message includes the current disk usage percentage. Then, the automation pauses and waits for the disk usage to drop below 60%. Once that happens, it sends a second, green-circle notification using the same logic to select the notification service, reporting the new disk usage percentage."
},
"human_like": "Monitors disk usage, sending a warning notification when it's high and an all-clear notification once it drops back below a safe threshold, but only when maintenance mode is off.",
"complexity": "medium"
}
},
{
"id": "maintenance_on_off",
"result": {
"structured": "TRIGGER: When Updates In Progress [sensor.updates_in_progress] changes state. CONDITIONS: Updates In Progress [sensor.updates_in_progress] state is defined. ACTIONS: If Updates In Progress [sensor.updates_in_progress] is below 1, turn off Maintenance Mode [input_boolean.maintenance_mode]. If Updates In Progress [sensor.updates_in_progress] is above 2, turn on Maintenance Mode [input_boolean.maintenance_mode].",
"natural_language": {
"trigger": "Whenever the state of the Updates In Progress [sensor.updates_in_progress] sensor changes.",
"conditions": "The automation only runs if the Updates In Progress [sensor.updates_in_progress] sensor has a defined state value.",
"action": "If the number of updates in progress is less than 1, it turns off the Maintenance Mode [input_boolean.maintenance_mode]. If the number of updates in progress is greater than 2, it turns on the Maintenance Mode [input_boolean.maintenance_mode]."
},
"human_like": "Automatically turns maintenance mode on or off based on the number of system updates currently in progress.",
"complexity": "medium"
}
},
{
"id": "maintenance_notifications",
"result": {
"structured": "TRIGGER: When Maintenance Mode [input_boolean.maintenance_mode] changes state. CONDITIONS: None. ACTIONS: IF Maintenance Mode [input_boolean.maintenance_mode] is on THEN (IF Updates In Progress [sensor.updates_in_progress] is defined THEN wait up to 1 minute for Updates In Progress [sensor.updates_in_progress] to be last updated more than 10 seconds ago) AND send a notification via a dynamically determined service (Notify Service Server [input_text.notify_service_server] if defined, else Notify Service [input_text.notify_service] if defined, else notify.notify) with a message indicating maintenance is in progress and listing pending updates if Updates In Progress [sensor.updates_in_progress] state is defined and greater than 0. IF Maintenance Mode [input_boolean.maintenance_mode] is off THEN send a notification via the same dynamically determined service with a message indicating maintenance is completed.",
"natural_language": {
"trigger": "Whenever the state of the Maintenance Mode [input_boolean.maintenance_mode] changes.",
"conditions": "There are no conditions that must be met for the automation to run.",
"action": "If Maintenance Mode [input_boolean.maintenance_mode] is turned on, the automation will first check if the Updates In Progress [sensor.updates_in_progress] sensor exists. If it does, it will wait for up to one minute for that sensor's data to be at least 10 seconds old. Then, it sends a notification. The notification service is chosen dynamically: it uses the Notify Service Server [input_text.notify_service_server] if it exists, otherwise the Notify Service [input_text.notify_service], and finally defaults to the standard 'notify.notify' service. The message states that maintenance is in progress and, if there are pending updates, lists them. If Maintenance Mode [input_boolean.maintenance_mode] is turned off, the automation immediately sends a notification using the same logic to determine the service, with a message announcing that maintenance has been successfully completed."
},
"human_like": "Sends a notification when maintenance mode is turned on or off, providing details about pending updates when starting and confirming completion when finished.",
"complexity": "medium"
}
},
{
"id": "unavailable_entities",
"result": {
"structured": "TRIGGER: When Unavailable Entities [sensor.unavailable_entities] changes state OR When Home Assistant starts OR When Maintenance Mode [input_boolean.maintenance_mode] turns off. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off AND Unavailable Entities [sensor.unavailable_entities] state is defined. ACTIONS: CHOOSE: 1) IF Unavailable Entities [sensor.unavailable_entities] is above 0 AND below 2 AND Unavailable Entities Last Triggered [input_number.unavailable_entities_last_triggered] value is not equal to Unavailable Entities [sensor.unavailable_entities] value THEN delay for a configurable number of minutes (default 10) using Delay Notify Unavailable [input_number.delay_notify_unavailable], set Unavailable Entities Last Triggered [input_number.unavailable_entities_last_triggered] to the current Unavailable Entities [sensor.unavailable_entities] value, and send a notification via a configurable service (Notify Service Unavailable [input_text.notify_service_unavailable], else Notify Service [input_text.notify_service], else notify.notify) with a message listing the single unavailable device. 2) IF Unavailable Entities [sensor.unavailable_entities] is above 1 AND Unavailable Entities Last Triggered [input_number.unavailable_entities_last_triggered] value is not equal to Unavailable Entities [sensor.unavailable_entities] value THEN delay for a configurable number of minutes (default 10) using Delay Notify Unavailable [input_number.delay_notify_unavailable], set Unavailable Entities Last Triggered [input_number.unavailable_entities_last_triggered] to the current Unavailable Entities [sensor.unavailable_entities] value, and send a notification via a configurable service with a message listing the multiple unavailable devices. 3) IF Unavailable Entities [sensor.unavailable_entities] is below 1 AND Unavailable Entities Last Triggered [input_number.unavailable_entities_last_triggered] value is greater than 0 THEN send a notification via a configurable service with a success message and set Unavailable Entities Last Triggered [input_number.unavailable_entities_last_triggered] to the current Unavailable Entities [sensor.unavailable_entities] value. OTHERWISE do nothing.",
"natural_language": {
"trigger": "The automation runs when the sensor tracking unavailable entities changes its state, when Home Assistant first starts up, or when the maintenance mode is turned off.",
"conditions": "It only proceeds if maintenance mode is currently off and the sensor for unavailable entities has a defined state.",
"action": "Depending on the number of unavailable devices, it sends a delayed notification. If there is exactly one unavailable device and the count has changed since the last notification, it waits a configurable time (default 10 minutes), records the new count, and sends a message listing the device. If there are two or more unavailable devices and the count has changed, it does the same but with a plural message. If all devices become available (zero unavailable) and a problem was previously reported, it immediately sends an 'all clear' notification and updates the recorded count. The notification service used can be configured, falling back to a default."
},
"human_like": "Sends notifications when devices become unavailable or become available again, with configurable delays to avoid spamming alerts.",
"complexity": "high"
}
},
{
"id": "unavailable_sensors",
"result": {
"structured": "TRIGGER: When Unavailable Sensors [sensor.unavailable_sensors] changes state OR when Home Assistant starts. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off AND Unavailable Sensors [sensor.unavailable_sensors] state is defined. ACTIONS: Choose based on the number of unavailable sensors: 1. If the count is between 1 and 2 (above 0, below 2) AND the last triggered value [input_number.unavailable_sensors_last_triggered] is different from the current count, then after a delay (from Delay Notify Unavailable [input_number.delay_notify_unavailable] or 10 minutes), update the last triggered value and send a notification (via Notify Service Unavailable [input_text.notify_service_unavailable], Notify Service [input_text.notify_service], or default 'notify.notify') listing the single sensor name. 2. If the count is greater than 1 (above 1) AND the last triggered value is different from the current count, then after the same delay, update the last triggered value and send a notification listing all sensor names. 3. If the count is less than 1 (below 1) AND the last triggered value is greater than 0, then send a notification that all sensors are working and update the last triggered value to 0.",
"natural_language": {
"trigger": "The automation triggers either when the Unavailable Sensors [sensor.unavailable_sensors] sensor changes its state, or when Home Assistant starts up.",
"conditions": "It only runs if Maintenance Mode [input_boolean.maintenance_mode] is turned off, and if the state of the Unavailable Sensors [sensor.unavailable_sensors] sensor is defined.",
"action": "Depending on how many sensors are unavailable, it performs different actions. If exactly one sensor is unavailable and this is a new state, it waits for a configurable delay (or 10 minutes by default), records the new count, and sends a notification listing that sensor's name. If more than one sensor is unavailable and this is a new state, it does the same but lists all unavailable sensor names. If no sensors are unavailable but there were some before, it sends an 'all clear' notification and resets the recorded count. The notification service used is configurable via input_text entities."
},
"human_like": "Sends notifications when sensors become unavailable or become available again, with configurable delays and service selection.",
"complexity": "high"
}
},
{
"id": "updates_available",
"result": {
"structured": "TRIGGER: When Updates Available [sensor.updates_available] changes state OR when Maintenance Mode [input_boolean.maintenance_mode] turns off. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off AND Updates Available [sensor.updates_available] state is defined. ACTIONS: If Updates Available [sensor.updates_available] is greater than 0 AND less than 2, then send a notification (via Notify Service Updates [input_text.notify_service_updates], Notify Service [input_text.notify_service], or default notify.notify) listing the single update and turn on Update Available Alert [input_boolean.update_available_alert]. OR If Updates Available [sensor.updates_available] is greater than 1, then send a notification listing all updates and turn on Update Available Alert [input_boolean.update_available_alert]. OR If Updates Available [sensor.updates_available] is less than 1 AND Update Available Alert [input_boolean.update_available_alert] is on, then send a notification that all devices and services are updated and turn off Update Available Alert [input_boolean.update_available_alert].",
"natural_language": {
"trigger": "The automation runs whenever the number of Updates Available [sensor.updates_available] changes, or when Maintenance Mode [input_boolean.maintenance_mode] is turned off.",
"conditions": "The automation only proceeds if Maintenance Mode [input_boolean.maintenance_mode] is currently off and the Updates Available [sensor.updates_available] sensor has a defined state.",
"action": "Depending on the number of updates available, it sends a notification and manages an alert flag. If there is exactly one update, it sends a notification listing that update and turns on the Update Available Alert [input_boolean.update_available_alert]. If there are two or more updates, it sends a notification listing all updates and turns on the alert. If there are zero updates and the alert is currently on, it sends a notification confirming all devices are updated and turns off the alert. The notification service is chosen from Notify Service Updates [input_text.notify_service_updates], Notify Service [input_text.notify_service], or a default service."
},
"human_like": "Sends notifications about available system updates, alerting the user when updates are pending and confirming when everything is up to date.",
"complexity": "medium"
}
},
{
"id": "updates_in_progress",
"result": {
"structured": "TRIGGER: When Updates In Progress [sensor.updates_in_progress] changes state OR when Home Assistant starts. CONDITIONS: Maintenance Mode [input_boolean.maintenance_mode] is off AND Updates In Progress [sensor.updates_in_progress] state is defined. ACTIONS: Wait 10 seconds. Then, choose based on the number of updates: IF Updates In Progress [sensor.updates_in_progress] is greater than 0 AND less than 2, THEN send a notification (via Notify Service Updates [input_text.notify_service_updates] or Notify Service [input_text.notify_service] or default to 'notify.notify') with a message listing the update names and turn on Update In Progress Alert [input_boolean.update_in_progress_alert]. IF Updates In Progress [sensor.updates_in_progress] is greater than 1, THEN send a notification with a message listing the update names and turn on Update In Progress Alert [input_boolean.update_in_progress_alert]. IF Updates In Progress [sensor.updates_in_progress] is less than 1 AND Update In Progress Alert [input_boolean.update_in_progress_alert] is on, THEN send a completion notification and turn off Update In Progress Alert [input_boolean.update_in_progress_alert]. OTHERWISE, do nothing.",
"natural_language": {
"trigger": "The automation runs whenever the Updates In Progress [sensor.updates_in_progress] sensor changes its state, or when Home Assistant first starts up.",
"conditions": "It only proceeds if Maintenance Mode [input_boolean.maintenance_mode] is turned off and if the Updates In Progress [sensor.updates_in_progress] sensor has a defined state.",
"action": "After a 10-second delay, it checks the number of updates. If there is exactly one update in progress, it sends a notification listing the update's name and marks an alert as active. If there are two or more updates, it sends a notification listing all update names and marks the alert as active. If there are zero updates and the alert was previously active, it sends a completion notification and turns off the alert. The notification service is chosen from a priority list: first Notify Service Updates [input_text.notify_service_updates], then Notify Service [input_text.notify_service], and finally a default service."
},
"human_like": "Sends notifications about system updates, alerting when updates start and when they are all finished, but only when maintenance mode is off.",
"complexity": "medium"
}
},
{
"id": "auto_update",
"result": {
"structured": "TRIGGER: When the current time matches the scheduled update time. The scheduled update time is defined by Auto Update Time [input_datetime.auto_update_time] if it exists, otherwise it is 03:30:00 on Monday through Thursday (weekdays 0-3). CONDITIONS: None. ACTIONS: Perform a series of conditional update installations: 1. IF there are any update entities (excluding those with device_class firmware, those in the 'ignore' label, and specific excluded entities: update.home_assistant_operating_system_update, update.home_assistant_core_update, update.esphome_device_builder_update, update.esphome_update) that are on, have supported_features 25, have a different installed_version and latest_version, and have been in the 'on' state for longer than a delay period (determined by comparing version numbers: if only patch differs, use Delay Update Minor [input_number.delay_update_minor] else use Delay Update [input_number.delay_update]; fallback to 24 hours for minor, 120 hours for major), THEN install those updates. 2. IF there are any update entities (same exclusions as above) that are on, have supported_features 23, have a different installed_version and latest_version, and have been in the 'on' state for longer than the same calculated delay period, THEN install those updates (continue on error). 3. IF there are any update entities with device_class firmware (excluding those in the 'ignore' label) that are on and have been in the 'on' state for longer than a delay period (defined by Delay Update [input_number.delay_update] or 96 hours), THEN install those updates (continue on error). 4. IF there are any update entities among update.esphome_device_builder_update or update.esphome_update (excluding those in the 'ignore' label) that are on, have a different installed_version and latest_version, and have been in the 'on' state for longer than the same calculated delay period, THEN install those updates (continue on error) AND wait up to 30 minutes for any other ESPHome update entities (with title 'ESPHome', excluding the two specific ones) to appear; if they appear, install them (continue on error). 5. Wait until Updates In Progress [sensor.updates_in_progress] is 0. 6. IF update.home_assistant_core_update is on, has a different installed_version and latest_version, and has been in the 'on' state for longer than the same calculated delay period, THEN install it (continue on error). 7. Wait until Updates In Progress [sensor.updates_in_progress] is 0. 8. IF update.home_assistant_operating_system_update is on and has been in the 'on' state for longer than a delay period (defined by Delay Update [input_number.delay_update] or 120 hours), THEN install it (continue on error).",
"natural_language": {
"trigger": "The automation triggers at a scheduled time. If a specific time is set in Auto Update Time [input_datetime.auto_update_time], it uses that. Otherwise, it defaults to 3:30 AM on weekdays (Monday through Thursday).",
"conditions": "There are no explicit conditions; the automation runs unconditionally once the trigger time is reached.",
"action": "The automation performs a comprehensive, multi-step update process. First, it checks for and installs available updates for entities that support installation with progress (supported_features 25), applying a delay based on whether the update is minor or major, using values from Delay Update Minor [input_number.delay_update_minor] and Delay Update [input_number.delay_update]. It then does the same for entities that support installation without progress (supported_features 23). Next, it handles firmware updates, using a delay from Delay Update [input_number.delay_update]. It then processes updates for specific ESPHome builder and core tools, and waits for any other ESPHome devices to become available for update. After each major batch, it waits for all updates in progress to finish (monitored by Updates In Progress [sensor.updates_in_progress]). Finally, it installs updates for Home Assistant Core and the Home Assistant Operating System, each with their respective delay checks. The automation is designed to continue even if some update actions fail."
},
"human_like": "This automation runs scheduled system and device updates overnight, intelligently delaying minor and major updates based on user preferences, and ensures updates are installed in a safe, sequential order.",
"complexity": "high"
}
}
]