[ { "id": "tginfoallarme", "result": { "structured": "TRIGGER: When a Telegram command /alarm is received OR when a Telegram callback with data /alarm is received OR when a Telegram callback with data /alarm-disarm is received OR when a Telegram callback with data /alarm-arm-home is received OR when a Telegram callback with data /alarm-arm-away is received OR when a Telegram callback with data /alarm-total is received OR when a Telegram callback with data /sirena is received. CONDITIONS: None. ACTIONS: Choose based on trigger ID: If trigger is alarm_command, run script tg_script_allarme with user_id. If trigger is alarm_callback, delete the callback message and run script tg_script_allarme with user_id. If trigger is alarm-disarm, delete the callback message, send 'OK, disattivo l'allarme', wait 2 seconds, delete that message, disarm home alarm control panel [alarm_control_panel.home] with code 1234, wait for the alarm state to become disarmed, wait 1 second, then run script tg_script_allarme with user_id. If trigger is alarm-arm-home, delete the callback message, send 'OK, attivo l'allarme', wait 2 seconds, delete that message, arm home alarm control panel [alarm_control_panel.home] in home mode with code 1234, wait for the alarm state to become armed_home, wait 1 second, then run script tg_script_allarme with user_id. If trigger is alarm-arm-away, delete the callback message, send 'OK, ATTIVO L'ALLARME' with a note about 20 seconds to exit, wait 3 seconds, arm home alarm control panel [alarm_control_panel.home] in away mode with code 1234, wait for the alarm state to become armed_away, delete the last message, wait 1 second, then run script tg_script_allarme with user_id. If trigger is alarm-total, delete the callback message, toggle allarme input boolean [input_boolean.allarme], wait 1 second, send a message indicating if sirena input boolean [input_boolean.sirena] is on or off, wait 2 seconds, delete that message, wait 1 second, then run script tg_script_allarme with user_id. If trigger is sirena, delete the callback message, toggle sirena input boolean [input_boolean.sirena], wait 1 second, send a message indicating if sirena input boolean [input_boolean.sirena] is on or off, wait 2 seconds, delete that message, wait 1 second, then run script tg_script_allarme with user_id.", "natural_language": { "trigger": "The automation is triggered by various Telegram interactions: receiving the command /alarm, or receiving a callback with data for /alarm, /alarm-disarm, /alarm-arm-home, /alarm-arm-away, /alarm-total, or /sirena.", "conditions": "There are no conditions that must be met before the actions are executed.", "action": "Depending on which trigger occurred, the automation performs different sequences. For the /alarm command or callback, it runs a script to show alarm status. For disarm, arm home, and arm away commands, it deletes the user's message, sends a confirmation, waits, performs the corresponding alarm action on the home alarm control panel [alarm_control_panel.home] using code 1234, waits for the alarm state to change, and then runs the status script. For the /alarm-total and /sirena commands, it toggles the corresponding input boolean (allarme input boolean [input_boolean.allarme] or sirena input boolean [input_boolean.sirena]), sends a status message, and then runs the status script. Most actions include deleting confirmation messages after a short delay." }, "human_like": "This automation handles alarm system commands sent via Telegram, allowing users to arm, disarm, check status, and toggle alarm features directly from their chat.", "complexity": "high" } }, { "id": "tg avvio server", "result": { "structured": "TRIGGER: When Home Assistant finishes starting up (event: start). CONDITIONS: None. ACTIONS: Wait for 10 seconds, then send a Telegram notification to fabio telegram notify [notify.fabio_telegram] with a message containing the current value of homeassistant start sensor [sensor.homeassistant_start] (with 'initialized in' replaced by 'avviato in') and an inline keyboard button.", "natural_language": { "trigger": "The automation triggers when Home Assistant completes its startup process.", "conditions": "There are no conditions that must be met.", "action": "After a 10-second delay, it sends a notification via Telegram to fabio telegram notify [notify.fabio_telegram]. The message includes the startup time from the homeassistant start sensor [sensor.homeassistant_start], with the text 'initialized in' replaced by 'avviato in', and provides an inline button to start the bot." }, "human_like": "Sends a Telegram notification with the Home Assistant startup time and a button to start the bot, 10 seconds after Home Assistant starts.", "complexity": "low" } }, { "id": "tg locate", "result": { "structured": "TRIGGER: When a telegram_command event with command /locate occurs OR When a telegram_callback event with data /locate occurs OR When a telegram_callback event with data /locate_iphone occurs OR When a telegram_callback event with data /locate_iphone_map occurs OR When a telegram_callback event with data /locate_pixel_7 occurs OR When a telegram_callback event with data /locate_pixel_7_map occurs OR When a telegram_callback event with data /locate_oppo occurs OR When a telegram_callback event with data /locate_oppo_map occurs. CONDITIONS: None. ACTIONS: Choose action based on trigger ID: If trigger ID is locate, run script.tg_script_locate with user_id from trigger. If trigger ID is locate_callback, delete the Telegram message and then run script.tg_script_locate with user_id from trigger. If trigger ID is locate_iphone, delete the Telegram message and then run script.tg_script_locate_iphone with user_id from trigger. If trigger ID is locate_iphone_map, delete the Telegram message and then run script.tg_script_locate_iphone_map with user_id from trigger. If trigger ID is locate_pixel_7, delete the Telegram message and then run script.tg_script_locate_pixel_7 with user_id from trigger. If trigger ID is locate_pixel_7_map, delete the Telegram message and then run script.tg_script_locate_pixel_7_map with user_id from trigger. If trigger ID is locate_oppo, delete the Telegram message and then run script.tg_script_locate_oppo with user_id from trigger. If trigger ID is locate_oppo_map, delete the Telegram message and then run script.tg_script_locate_oppo_map with user_id from trigger.", "natural_language": { "trigger": "The automation is triggered by various Telegram events. These include receiving a command '/locate', or receiving a callback with data '/locate', '/locate_iphone', '/locate_iphone_map', '/locate_pixel_7', '/locate_pixel_7_map', '/locate_oppo', or '/locate_oppo_map'.", "conditions": "There are no conditions that must be met for the automation to proceed.", "action": "The automation performs different sequences of actions depending on which specific trigger occurred. For the basic '/locate' command, it runs a script to locate devices. For all callback triggers, it first deletes the original Telegram message and then runs a specific script corresponding to the callback data. For example, a callback with '/locate_iphone' triggers a script to locate an iPhone, while a callback with '/locate_iphone_map' triggers a script to locate an iPhone and provide a map." }, "human_like": "This automation handles Telegram commands and callbacks to locate various devices, deleting the original message for callbacks before running the appropriate location script.", "complexity": "medium" } }, { "id": "tginfoluci", "result": { "structured": "TRIGGER: When a telegram_command event with command /luci occurs OR When a telegram_callback event with data /luci occurs OR When a telegram_callback event with data /luci_off occurs OR When a telegram_callback event with data /soggiorno occurs OR When a telegram_callback event with data /accendisoggiorno occurs OR When a telegram_callback event with data /spegnisoggiorno occurs OR When a telegram_callback event with data /luce_soggiorno occurs OR When a telegram_callback event with data /led_soggiorno occurs OR When a telegram_callback event with data /lampada_soggiorno occurs OR When a telegram_callback event with data /cucina occurs OR When a telegram_callback event with data /accendicucina occurs OR When a telegram_callback event with data /spegnicucina occurs OR When a telegram_callback event with data /luce_cucina occurs OR When a telegram_callback event with data /luce_ripostiglio occurs OR When a telegram_callback event with data /ingresso occurs OR When a telegram_callback event with data /accendiingresso occurs OR When a telegram_callback event with data /spegniingresso occurs OR When a telegram_callback event with data /luce_ingresso_1 occurs OR When a telegram_callback event with data /luce_ingresso_2 occurs OR When a telegram_callback event with data /corridoio occurs OR When a telegram_callback event with data /accendicorridoio occurs OR When a telegram_callback event with data /spegnicorridoio occurs OR When a telegram_callback event with data /luce_armadio occurs OR When a telegram_callback event with data /luce_scarpiera occurs OR When a telegram_callback event with data /matrimoniale occurs OR When a telegram_callback event with data /accendimatrimoniale occurs OR When a telegram_callback event with data /spegnimatrimoniale occurs OR When a telegram_callback event with data /luce_camera occurs OR When a telegram_callback event with data /luce_comodino occurs OR When a telegram_callback event with data /cameretta occurs OR When a telegram_callback event with data /accendicameretta occurs OR When a telegram_callback event with data /spegnicameretta occurs OR When a telegram_callback event with data /luce_cameretta occurs OR When a telegram_callback event with data /studio occurs OR When a telegram_callback event with data /accendistudio occurs OR When a telegram_callback event with data /spegnistudio occurs OR When a telegram_callback event with data /luce_studio occurs OR When a telegram_callback event with data /luce_scrivania occurs OR When a telegram_callback event with data /bagni occurs OR When a telegram_callback event with data /accendibagni occurs OR When a telegram_callback event with data /spegnibagni occurs OR When a telegram_callback event with data /bagnogrande occurs OR When a telegram_callback event with data /accendibagnogrande occurs OR When a telegram_callback event with data /spegnibagnogrande occurs OR When a telegram_callback event with data /luce_bagno_grande occurs OR When a telegram_callback event with data /bagnopiccolo occurs OR When a telegram_callback event with data /accendibagnopiccolo occurs OR When a telegram_callback event with data /spegnibagnopiccolo occurs OR When a telegram_callback event with data /luce_bagno_piccolo occurs OR When a telegram_callback event with data /luce_specchio occurs. CONDITIONS: None. ACTIONS: Based on which trigger occurred, execute the corresponding sequence: IF trigger is luci_command THEN run script.tg_script_luci. IF trigger is luci_callback THEN delete the Telegram message AND run script.tg_script_luci. IF trigger is luci_off THEN turn off luci light [light.luci], wait 1 second, AND run script.tg_script_luci_edit. IF trigger is soggiorno THEN delete the Telegram message AND run script.tg_script_luci_soggiorno. IF trigger is accendisoggiorno THEN turn on soggiorno light [light.soggiorno] AND run script.tg_script_luci_soggiorno_edit. IF trigger is spegnisoggiorno THEN turn off soggiorno light [light.soggiorno], wait 1 second, AND run script.tg_script_luci_soggiorno_edit. IF trigger is luce_soggiorno THEN toggle luce soggiorno light [light.luce_soggiorno], wait 1 second, AND run script.tg_script_luci_soggiorno_edit. IF trigger is led_soggiorno THEN toggle led soggiorno light [light.led_soggiorno], wait 1 second, AND run script.tg_script_luci_soggiorno_edit. IF trigger is lampada_soggiorno THEN toggle lampada soggiorno light [light.lampada_soggiorno], wait 1 second, AND run script.tg_script_luci_soggiorno_edit. IF trigger is cucina THEN delete the Telegram message AND run script.tg_script_luci_cucina. IF trigger is accendicucina THEN turn on cucina light [light.cucina], wait 1 second, AND run script.tg_script_luci_cucina_edit. IF trigger is spegnicucina THEN turn off cucina light [light.cucina], wait 1 second, AND run script.tg_script_luci_cucina_edit. IF trigger is luce_cucina THEN toggle luce cucina light [light.luce_cucina], wait 1 second, AND run script.tg_script_luci_cucina_edit. IF trigger is luce_ripostiglio THEN toggle ripostiglio light [light.ripostiglio], wait 1 second, AND run script.tg_script_luci_cucina_edit. IF trigger is ingresso THEN delete the Telegram message AND run script.tg_script_luci_ingresso. IF trigger is accendiingresso THEN turn on ingresso light [light.ingresso], wait 1 second, AND run script.tg_script_luci_ingresso_edit. IF trigger is spegniingresso THEN turn off ingresso light [light.ingresso], wait 1 second, AND run script.tg_script_luci_ingresso_edit. IF trigger is luce_ingresso_1 THEN toggle luce ingresso 1 light [light.luce_ingresso_1], wait 1 second, AND run script.tg_script_luci_ingresso_edit. IF trigger is luce_ingresso_2 THEN toggle luce ingresso 2 light [light.luce_ingresso_2], wait 1 second, AND run script.tg_script_luci_ingresso_edit. IF trigger is corridoio THEN delete the Telegram message AND run script.tg_script_luci_corridoio. IF trigger is accendicorridoio THEN turn on corridoio light [light.corridoio], wait 1 second, AND run script.tg_script_luci_corridoio_edit. IF trigger is spegnicorridoio THEN turn off corridoio light [light.corridoio], wait 1 second, AND run script.tg_script_luci_corridoio_edit. IF trigger is luce_armadio THEN toggle armadio light [light.armadio], wait 1 second, AND run script.tg_script_luci_corridoio_edit. IF trigger is luce_scarpiera THEN toggle scarpiera light [light.scarpiera], wait 1 second, AND run script.tg_script_luci_corridoio_edit. IF trigger is matrimoniale THEN delete the Telegram message AND run script.tg_script_luci_camera. IF trigger is accendimatrimoniale THEN turn on camera light [light.camera], wait 1 second, AND run script.tg_script_luci_camera_edit. IF trigger is spegnimatrimoniale THEN turn off camera light [light.camera], wait 1 second, AND run script.tg_script_luci_camera_edit. IF trigger is luce_camera THEN toggle luce camera light [light.luce_camera], wait 1 second, AND run script.tg_script_luci_camera_edit. IF trigger is luce_comodino THEN toggle comodino light [light.comodino], wait 1 second, AND run script.tg_script_luci_camera_edit. IF trigger is cameretta THEN delete the Telegram message AND run script.tg_script_luci_cameretta. IF trigger is accendicameretta THEN turn on cameretta light [light.cameretta], wait 1 second, AND run script.tg_script_luci_cameretta_edit. IF trigger is spegnicameretta THEN turn off cameretta light [light.cameretta], wait 1 second, AND run script.tg_script_luci_cameretta_edit. IF trigger is luce_cameretta THEN toggle luce cameretta light [light.luce_cameretta], wait 1 second, AND run script.tg_script_luci_cameretta_edit. IF trigger is studio THEN delete the Telegram message AND run script.tg_script_luci_studio. IF trigger is accendistudio THEN turn on studio light [light.studio], wait 1 second, AND run script.tg_script_luci_studio_edit. IF trigger is spegnistudio THEN turn off studio light [light.studio], wait 1 second, AND run script.tg_script_luci_studio_edit. IF trigger is luce_studio THEN toggle luce studio light [light.luce_studio], wait 1 second, AND run script.tg_script_luci_studio_edit. IF trigger is luce_scrivania THEN toggle luce scrivania light [light.luce_scrivania], wait 1 second, AND run script.tg_script_luci_studio_edit. IF trigger is bagni THEN delete the Telegram message AND run script.tg_script_luci_bagni. IF trigger is accendibagni THEN turn on bagni light [light.bagni], wait 1 second, AND run script.tg_script_luci_bagni_edit. IF trigger is spegnibagni THEN turn off bagni light [light.bagni], wait 1 second, AND run script.tg_script_luci_bagni_edit. IF trigger is bagnogrande THEN delete the Telegram message AND run script.tg_script_luci_bagno_grande. IF trigger is accendibagnogrande THEN turn on bagno grande light [light.bagno_grande], wait 1 second, AND run script.tg_script_luci_bagno_grande_edit. IF trigger is spegnibagnogrande THEN turn off bagno grande light [light.bagno_grande], wait 1 second, AND run script.tg_script_luci_bagno_grande_edit. IF trigger is luce_bagno_grande THEN toggle luce bagno grande light [light.luce_bagno_grande], wait 1 second, AND run script.tg_script_luci_bagno_grande_edit. IF trigger is bagnopiccolo THEN delete the Telegram message AND run script.tg_script_luci_bagno_piccolo. IF trigger is accendibagnopiccolo THEN turn on bagno piccolo light [light.bagno_piccolo], wait 1 second, AND run script.tg_script_luci_bagno_piccolo_edit. IF trigger is spegnibagnopiccolo THEN turn off bagno piccolo light [light.bagno_piccolo], wait 1 second, AND run script.tg_script_luci_bagno_piccolo_edit. IF trigger is luce_bagno_piccolo THEN toggle luce bagno piccolo light [light.luce_bagno_piccolo], wait 1 second, AND run script.tg_script_luci_bagno_piccolo_edit. IF trigger is luce_specchio THEN toggle specchio bagno piccolo light [light.specchio_bagno_piccolo], wait 1 second, AND run script.tg_script_luci_bagno_piccolo_edit.", "natural_language": { "trigger": "The automation is triggered by various Telegram commands or callback interactions. These include receiving the command '/luci', or receiving callback data for commands like '/luci', '/luci_off', '/soggiorno', '/accendisoggiorno', '/spegnisoggiorno', '/luce_soggiorno', '/led_soggiorno', '/lampada_soggiorno', '/cucina', '/accendicucina', '/spegnicucina', '/luce_cucina', '/luce_ripostiglio', '/ingresso', '/accendiingresso', '/spegniingresso', '/luce_ingresso_1', '/luce_ingresso_2', '/corridoio', '/accendicorridoio', '/spegnicorridoio', '/luce_armadio', '/luce_scarpiera', '/matrimoniale', '/accendimatrimoniale', '/spegnimatrimoniale', '/luce_camera', '/luce_comodino', '/cameretta', '/accendicameretta', '/spegnicameretta', '/luce_cameretta', '/studio', '/accendistudio', '/spegnistudio', '/luce_studio', '/luce_scrivania', '/bagni', '/accendibagni', '/spegnibagni', '/bagnogrande', '/accendibagnogrande', '/spegnibagnogrande', '/luce_bagno_grande', '/bagnopiccolo', '/accendibagnopiccolo', '/spegnibagnopiccolo', '/luce_bagno_piccolo', and '/luce_specchio'.", "conditions": "There are no conditions that must be met for the actions to run.", "action": "Depending on which specific Telegram command or callback triggered the automation, a different sequence of actions is performed. For most room-specific commands (like '/soggiorno', '/cucina'), the corresponding Telegram message is deleted and a script is run to display a control interface. For commands that directly control lights (like '/accendisoggiorno', '/spegnisoggiorno', or toggle commands like '/luce_soggiorno'), the relevant light is turned on, off, or toggled. After a short one-second delay, a script is run to update the Telegram interface message. For the '/luci' command, a main lighting control script is run. For the '/luci_off' command, the main 'luci light' is turned off before updating the interface." }, "human_like": "This automation provides a comprehensive Telegram-based interface for controlling all the lights in the home, allowing you to turn them on, off, or toggle them with simple commands and interactive buttons.", "complexity": "high" } }, { "id": "tgmeteo", "result": { "structured": "TRIGGER: When a Telegram command /meteo is received OR When a Telegram callback with data /meteo is received. CONDITIONS: None. ACTIONS: If triggered by /meteo command, execute script tg_script_meteo with user_id. If triggered by /meteo callback, delete the callback message and then execute script tg_script_meteo with user_id.", "natural_language": { "trigger": "When a user sends the Telegram command /meteo, or when a user interacts with a Telegram callback button containing the data /meteo.", "conditions": "There are no conditions that must be met for the automation to run.", "action": "If the automation was triggered by the /meteo command, it runs the script tg_script_meteo, passing along the user's ID. If it was triggered by a /meteo callback, it first deletes the message that contained the callback button and then runs the same script tg_script_meteo with the user's ID." }, "human_like": "Responds to a user's request for weather information via Telegram, either from a typed command or a button press, and runs a weather script.", "complexity": "medium" } }, { "id": "tgnotificainfoallarme", "result": { "structured": "TRIGGER: When home alarm control panel [alarm_control_panel.home] changes to disarmed OR When home alarm control panel [alarm_control_panel.home] changes to armed_home OR When home alarm control panel [alarm_control_panel.home] changes to armed_away. CONDITIONS: None. ACTIONS: If the trigger was alarm-disarmed, then send a notification to fabio telegram notify [notify.fabio_telegram] with the message '*Allarme disattivato*' and the current time from time sensor [sensor.time]. If the trigger was alarm-armed-home, then send a notification to fabio telegram notify [notify.fabio_telegram] with the message '*Allarme attivato (HOME)*' and the current time from time sensor [sensor.time]. If the trigger was alarm-armed-away, then send a notification to fabio telegram notify [notify.fabio_telegram] with the message '*ALLARME ATTIVATO (FUORI CASA)*' and the current time from time sensor [sensor.time].", "natural_language": { "trigger": "When the home alarm control panel [alarm_control_panel.home] changes its state to disarmed, armed_home, or armed_away.", "conditions": "There are no conditions that must be met for the automation to run.", "action": "Depending on which alarm state change occurred, the automation sends a different Telegram notification to fabio telegram notify [notify.fabio_telegram]. If the alarm is disarmed, it sends a message stating the alarm is deactivated. If the alarm is armed in home mode, it sends a message stating the alarm is activated in home mode. If the alarm is armed in away mode, it sends a message stating the alarm is activated in away mode. Each message includes the current time from the time sensor [sensor.time]." }, "human_like": "Sends a Telegram notification with the current time whenever the home alarm system is armed or disarmed.", "complexity": "medium" } }, { "id": "tginfonotifiche", "result": { "structured": "TRIGGER: When a Telegram command event with command /notify occurs OR when a Telegram callback event with data /notify occurs OR when a Telegram callback event with data /telegram_off occurs OR when a Telegram callback event with data /telegram_on occurs OR when a Telegram callback event with data /app_companion_off occurs OR when a Telegram callback event with data /app_companion_on occurs. CONDITIONS: None. ACTIONS: Choose based on trigger ID: If trigger ID is notify, run script tg_script_notifiche with user_id from event. If trigger ID is notify_callback, delete the callback message and then run script tg_script_notifiche with user_id from event. If trigger ID is telegram_off, turn off telegram input boolean [input_boolean.telegram], delete the callback message, wait 1 second, send a confirmation message, wait 2 seconds, delete the last sent message, and then run script tg_script_notifiche with user_id from event. If trigger ID is telegram_on, turn on telegram input boolean [input_boolean.telegram], delete the callback message, wait 1 second, send a confirmation message, wait 2 seconds, delete the last sent message, and then run script tg_script_notifiche with user_id from event. If trigger ID is app_companion_off, turn off notifiche in app input boolean [input_boolean.notifiche_in_app], delete the callback message, wait 1 second, send a confirmation message, wait 2 seconds, delete the last sent message, and then run script tg_script_notifiche with user_id from event. If trigger ID is app_companion_on, turn on notifiche in app input boolean [input_boolean.notifiche_in_app], delete the callback message, wait 1 second, send a confirmation message, wait 2 seconds, delete the last sent message, and then run script tg_script_notifiche with user_id from event.", "natural_language": { "trigger": "The automation is triggered by specific Telegram events. These include receiving the command '/notify', or receiving a callback from a Telegram button with the data '/notify', '/telegram_off', '/telegram_on', '/app_companion_off', or '/app_companion_on'.", "conditions": "There are no conditions that must be met for the actions to run; the automation executes immediately upon any of the triggers.", "action": "The action taken depends on which specific trigger occurred. For the '/notify' command, it runs a notification script. For the '/notify' callback, it deletes the button message and then runs the same script. For the '/telegram_off' and '/telegram_on' callbacks, it toggles the telegram input boolean [input_boolean.telegram] off or on, deletes the button message, sends a confirmation message, deletes that confirmation after a short delay, and finally runs the notification script. Similarly, for the '/app_companion_off' and '/app_companion_on' callbacks, it toggles the notifiche in app input boolean [input_boolean.notifiche_in_app] off or on, deletes the button message, sends a confirmation, deletes it, and runs the notification script." }, "human_like": "Manages Telegram notification settings, allowing users to turn notifications on or off via commands or interactive buttons, and provides feedback.", "complexity": "medium" } }, { "id": "tgsensori", "result": { "structured": "TRIGGER: When a Telegram command event with command '/sensori' is received OR when a Telegram callback event with data '/sensori' is received OR when a Telegram callback event with data '/aggiorna_sensori' is received. CONDITIONS: None. ACTIONS: If the trigger is the Telegram command '/sensori', execute script.tg_script_sensori with user_id from the event. If the trigger is the Telegram callback '/sensori', delete the original callback message using its message_id and user_id, then execute script.tg_script_sensori with user_id from the event. If the trigger is the Telegram callback '/aggiorna_sensori', execute script.tg_script_sensori_edit with message_id and user_id from the event.", "natural_language": { "trigger": "The automation is triggered by receiving a specific Telegram command or callback. This includes receiving the '/sensori' command, receiving a callback with the '/sensori' data, or receiving a callback with the '/aggiorna_sensori' data.", "conditions": "There are no conditions to evaluate; the automation proceeds directly to actions upon being triggered.", "action": "Depending on which trigger occurred, the automation performs different actions. If triggered by the '/sensori' command, it runs a script to handle sensors. If triggered by the '/sensori' callback, it first deletes the original callback message and then runs the same sensor script. If triggered by the '/aggiorna_sensori' callback, it runs a different script to update the sensor information, using the original message's ID." }, "human_like": "This automation responds to Telegram commands and callbacks related to sensors, either by sending sensor information or updating an existing message with new sensor data.", "complexity": "medium" } }, { "id": "tgservizi", "result": { "structured": "TRIGGER: When a Telegram command event with command /servizi occurs OR when a Telegram callback event with data /servizi occurs OR when a Telegram callback event with data /reload_localtuya occurs. CONDITIONS: None. ACTIONS: If the trigger is the Telegram command /servizi, then run script tg_script_servizi with the user_id from the event. If the trigger is the Telegram callback /servizi, then delete the callback message and run script tg_script_servizi with the user_id. If the trigger is the Telegram callback /reload_localtuya, then reload the localtuya integration, delete the callback message, wait 1 second, send a confirmation message to the user, wait 2 seconds, delete the last message sent to the user, and run script tg_script_servizi with the user_id.", "natural_language": { "trigger": "The automation is triggered by one of three events: receiving a Telegram command '/servizi', receiving a Telegram callback with data '/servizi', or receiving a Telegram callback with data '/reload_localtuya'.", "conditions": "There are no conditions that must be met for the automation to proceed.", "action": "Depending on which event triggered the automation, different actions are performed. For the '/servizi' command, it runs the 'tg_script_servizi' script. For the '/servizi' callback, it first deletes the callback message and then runs the same script. For the '/reload_localtuya' callback, it reloads the localtuya integration, deletes the callback message, waits a moment, sends a confirmation message to the user, waits again, deletes that confirmation message, and finally runs the 'tg_script_servizi' script." }, "human_like": "This automation handles Telegram commands and callbacks related to services and the localtuya integration, performing actions like running scripts, reloading integrations, and managing messages.", "complexity": "medium" } }, { "id": "tginfosistema", "result": { "structured": "TRIGGER: When a Telegram command /sistema is received OR when a Telegram callback with data /sistema is received OR when a Telegram callback with data /restart_ha is received OR when a Telegram callback with data /restart_ha_yes is received. CONDITIONS: None. ACTIONS: Choose based on trigger ID: If trigger ID is sistema, execute script.tg_script_sistema with user_id from trigger. If trigger ID is sistema_callback, delete the callback message and then execute script.tg_script_sistema with user_id from trigger. If trigger ID is restart_ha, delete the callback message and send a confirmation message with inline keyboard options to user_id from trigger. If trigger ID is restart_ha_yes, send a restart notification message to user_id from trigger and then restart Home Assistant.", "natural_language": { "trigger": "The automation is triggered by receiving a specific Telegram command or callback. This includes the command '/sistema', or callbacks with the data '/sistema', '/restart_ha', or '/restart_ha_yes'.", "conditions": "There are no conditions that must be met for the actions to run; the automation proceeds directly based on which trigger occurred.", "action": "Depending on which trigger fired, the automation performs different actions. For the '/sistema' command, it runs a system information script. For the '/sistema' callback, it deletes the original message and then runs the same script. For the '/restart_ha' callback, it deletes the message and sends a confirmation prompt asking if the user is sure they want to restart. For the '/restart_ha_yes' callback, it sends a notification that Home Assistant is restarting and then initiates the restart." }, "human_like": "This automation handles Telegram commands for system information and restarting Home Assistant, providing interactive responses and confirmation prompts.", "complexity": "medium" } }, { "id": "tgsnapshots", "result": { "structured": "TRIGGER: When a Telegram command event with command '/snapshots' is received OR when a Telegram callback event with data '/snapshots' is received OR when a Telegram callback event with data '/snap_soggiorno' is received OR when a Telegram callback event with data '/snap_porta' is received OR when a Telegram callback event with data '/snap_cucina' is received OR when a Telegram callback event with data '/snap_cucina2' is received OR when a Telegram callback event with data '/snap_camera' is received OR when a Telegram callback event with data '/snap_cameretta' is received OR when a Telegram callback event with data '/snap_tutti' is received. CONDITIONS: None. ACTIONS: Choose based on trigger ID: If triggered by '/snapshots', run script.tg_script_snapshots. If triggered by '/snapshots_callback', delete the Telegram message and run script.tg_script_snapshots. If triggered by '/snap_soggiorno', delete the Telegram message, take a snapshot from soggiorno camera [camera.soggiorno_onvif_profile000], send the photo via Telegram with a caption, and run script.tg_script_snapshots. If triggered by '/snap_porta', delete the Telegram message, take a snapshot from porta ingresso camera [camera.porta_ingresso], send the photo via Telegram with a caption, and run script.tg_script_snapshots. If triggered by '/snap_cucina', delete the Telegram message, take a snapshot from cucina camera [camera.cucina_onvif_profile000], send the photo via Telegram with a caption, and run script.tg_script_snapshots. If triggered by '/snap_cucina2', delete the Telegram message, take a snapshot from cucina acti camera [camera.cucina_acti], send the photo via Telegram with a caption, and run script.tg_script_snapshots. If triggered by '/snap_camera', delete the Telegram message, take a snapshot from camera camera [camera.camera_onvif_profile000], send the photo via Telegram with a caption, and run script.tg_script_snapshots. If triggered by '/snap_cameretta', delete the Telegram message, take a snapshot from cameretta camera [camera.cameretta_onvif_profile000], send the photo via Telegram with a caption, and run script.tg_script_snapshots. If triggered by '/snap_tutti', delete the Telegram message, take snapshots from porta ingresso camera [camera.porta_ingresso], Soggiorno [camera.soggiorno], Cucina [camera.cucina], cucina acti camera [camera.cucina_acti], Camera [camera.camera], and Cameretta [camera.cameretta], then send each photo via Telegram with a caption, and run script.tg_script_snapshots.", "natural_language": { "trigger": "The automation is triggered by receiving specific Telegram commands or callback queries. These include the command '/snapshots', or callback data for '/snapshots', '/snap_soggiorno', '/snap_porta', '/snap_cucina', '/snap_cucina2', '/snap_camera', '/snap_cameretta', or '/snap_tutti'.", "conditions": "There are no conditions that must be met for the actions to run.", "action": "Depending on which trigger activated the automation, it performs a series of actions. For the main '/snapshots' command, it runs a script to handle snapshot options. For callback triggers, it first deletes the original Telegram message. For specific room triggers (like '/snap_soggiorno'), it takes a snapshot from the corresponding camera, sends that photo back to the user via Telegram with a timestamped caption, and then runs the snapshot script. For the '/snap_tutti' trigger, it takes snapshots from all six cameras, sends each photo individually via Telegram with captions, and then runs the snapshot script." }, "human_like": "This automation provides a Telegram interface to take and receive snapshots from various security cameras around the home, either individually or all at once.", "complexity": "medium" } }, { "id": "telegram_start", "result": { "structured": "TRIGGER: When a Telegram command event with command /start occurs OR when a Telegram callback event with data /start occurs. CONDITIONS: None. ACTIONS: Send a Telegram message to the user who triggered the event with the title 'Benvenuto in Home Assistant', the message '*COMANDI DISPONIBILI:*', and an inline keyboard containing predefined command shortcuts.", "natural_language": { "trigger": "When a user sends the /start command via Telegram or interacts with a Telegram callback button that sends the /start data.", "conditions": "There are no conditions that must be met.", "action": "Sends a welcome message to the user on Telegram, listing available commands with an interactive keyboard for easy access." }, "human_like": "Sends a welcome message with a menu of available commands when a user starts interacting with the Home Assistant Telegram bot.", "complexity": "low" } }, { "id": "telegram_stop", "result": { "structured": "TRIGGER: When a telegram_callback event occurs with data '/stop'. CONDITIONS: None. ACTIONS: Delete the Telegram message that triggered the event (message_id: {{ trigger.event.data.message.message_id }}, chat_id: {{ trigger.event.data.user_id }}) AND send a new Telegram message to the user (chat_id: {{ trigger.event.data.user_id }}) with the text '*PANNELLO DI CONTROLLO*' and an inline keyboard containing menu options for home status, lights, sensors, alarm, notifications, system, services, cameras, device location, snapshots, and weather.", "natural_language": { "trigger": "When a user interacts with a Telegram bot and sends a callback with the command '/stop'.", "conditions": "There are no conditions for this automation.", "action": "The automation deletes the original '/stop' message from the Telegram chat and then sends a new message back to the same user. The new message displays the text '*PANNELLO DI CONTROLLO*' (Control Panel) and provides an inline keyboard with buttons to access various home control functions like home status, lights, sensors, alarm, notifications, system, services, cameras, device location, snapshots, and weather." }, "human_like": "This automation handles the '/stop' command in Telegram by clearing the command and showing the main control panel menu to the user.", "complexity": "low" } }, { "id": "tgstatocasa", "result": { "structured": "TRIGGER: When a Telegram command event with command '/casa' is received OR when a Telegram callback event with data '/casa' is received OR when a Telegram callback event with command '/light_off' is received OR when a Telegram callback event with command '/switch_off' is received. CONDITIONS: None (choose block selects action based on trigger ID). ACTIONS: If triggered by '/casa' command, run script.tg_script_stato_casa with the user ID. If triggered by '/casa' callback, delete the callback message, then run script.tg_script_stato_casa with the user ID. If triggered by '/light_off' callback, delete the callback message, send 'OK', wait 3 seconds, turn off luci light [light.luci], delete the 'OK' message, send 'Ho spento le luci', wait 3 seconds, delete that message, then run script.tg_script_stato_casa. If triggered by '/switch_off' callback, delete the callback message, send 'OK', wait 3 seconds, turn off switch switch [switch.switch], delete the 'OK' message, send 'Ho spento gli interruttori', wait 3 seconds, delete that message, then run script.tg_script_stato_casa.", "natural_language": { "trigger": "The automation is triggered by receiving specific Telegram events: a command '/casa', a callback with data '/casa', a callback with command '/light_off', or a callback with command '/switch_off'.", "conditions": "There are no separate conditions. The automation uses a choose action to select which sequence to run based solely on which trigger event occurred.", "action": "Depending on the trigger, it performs different sequences. For the '/casa' command, it runs a script to report the home status. For the '/casa' callback, it deletes the callback message and then runs the same status script. For the '/light_off' callback, it deletes the message, sends a confirmation, waits, turns off the luci light [light.luci], sends a status update, waits, deletes that update, and finally runs the home status script. For the '/switch_off' callback, it performs a similar sequence but turns off the switch switch [switch.switch] and sends a corresponding message." }, "human_like": "This automation handles Telegram commands to check the home status or turn off lights and switches, providing feedback and updates through the chat.", "complexity": "medium" } }, { "id": "tgvideo", "result": { "structured": "TRIGGER: When a Telegram command event with command /video is received OR when a Telegram callback event with data /video is received OR when a Telegram callback event with data /video_soggiorno is received OR when a Telegram callback event with data /video_cucina is received OR when a Telegram callback event with data /video_camera is received OR when a Telegram callback event with data /video_cameretta is received OR when a Telegram callback event with data /video_tutti is received. CONDITIONS: None. ACTIONS: Choose based on trigger ID: IF trigger ID is video THEN run script tg_script_video with user_id from trigger. IF trigger ID is video_callback THEN delete the callback message using its message_id and user_id, THEN run script tg_script_video with user_id from trigger. IF trigger ID is video_soggiorno THEN delete the callback message, THEN in parallel: run script tg_script_video_soggiorno with user_id AND send a message 'Registrazione soggiorno in corso' with title 'Attendere 10 secondi' to user_id, wait 10 seconds, delete the last sent message. AFTER parallel actions, run script tg_script_video with user_id. IF trigger ID is video_cucina THEN delete the callback message, THEN in parallel: run script tg_script_video_cucina with user_id AND send a message 'Registrazione cucina in corso' with title 'Attendere 10 secondi' to user_id, wait 10 seconds, delete the last sent message. AFTER parallel actions, run script tg_script_video with user_id. IF trigger ID is video_camera THEN delete the callback message, THEN in parallel: run script tg_script_video_camera with user_id AND send a message 'Registrazione camera in corso' with title 'Attendere 10 secondi' to user_id, wait 10 seconds, delete the last sent message. AFTER parallel actions, run script tg_script_video with user_id. IF trigger ID is video_cameretta THEN delete the callback message, THEN in parallel: run script tg_script_video_cameretta with user_id AND send a message 'Registrazione cameretta in corso' with title 'Attendere 10 secondi' to user_id, wait 10 seconds, delete the last sent message. AFTER parallel actions, run script tg_script_video with user_id. IF trigger ID is video_tutti THEN delete the callback message, THEN in parallel: run scripts tg_script_video_soggiorno, tg_script_video_cucina, tg_script_video_camera, and tg_script_video_cameretta all with user_id AND send a message 'Registrazione video in corso' with title 'Attendere 10 secondi' to user_id, wait 10 seconds, delete the last sent message. AFTER parallel actions, run script tg_script_video with user_id.", "natural_language": { "trigger": "The automation is triggered by receiving a specific Telegram command or callback. This includes the command '/video', or callbacks with the data '/video', '/video_soggiorno', '/video_cucina', '/video_camera', '/video_cameretta', or '/video_tutti'.", "conditions": "There are no conditions that must be met for the actions to run.", "action": "The automation performs different sequences of actions depending on which specific trigger occurred. For the basic '/video' command, it simply runs the tg_script_video script. For the '/video' callback, it first deletes the callback message and then runs the tg_script_video script. For the room-specific triggers (soggiorno, cucina, camera, cameretta), it deletes the callback message, then simultaneously starts the corresponding room video recording script and sends a temporary status message to the user which is deleted after a 10-second delay. After these parallel tasks, it runs the main tg_script_video script. For the '/video_tutti' (all) trigger, it deletes the callback message, then simultaneously starts video recording scripts for all four rooms and sends a temporary status message, which is also deleted after 10 seconds, before finally running the main tg_script_video script." }, "human_like": "This automation handles video recording requests via Telegram, allowing users to start recordings for individual rooms or all rooms at once, providing status feedback and cleaning up messages automatically.", "complexity": "high" } } ]