Created
November 30, 2025 17:09
-
-
Save fabiosoft/d0b08435a61573ee2f57c741bc7701e8 to your computer and use it in GitHub Desktop.
Home Assistant – Timer Blueprint (con Telegram)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: Timer | |
| description: > | |
| # ⏲️ Timer | |
| **Version: 1.4 (con Telegram)** | |
| Effortless Control: Schedule 📅, Trigger ⚡, and Automate Your Home 🏠 with Precision 🎯! | |
| **If you like my blueprints, and would like to show your support or just say thank you?** [Click Here](https://www.paypal.com/donate/?hosted_button_id=WAZS3QSDTPGA8) 🙂 | |
| <details> | |
| <summary><b>The Automation Process:</b> 👈</summary> | |
| - **Automation:** | |
| - Turn ON and OFF any entity you like on a set time. | |
| - You must use a timer helper for this automation to work. | |
| - **Multiple Timers:** | |
| - You can set up to 4 different time triggers, each with its own time period. | |
| - **Weekdays Condition Option:** | |
| - Specify the weekdays to define when the automation can run. | |
| </details> | |
| Need help? | |
| - FAQ: [Click Here](https://community.home-assistant.io/t/time-clock/651151/2) | |
| - Community Support Including Updates: [Click Here](https://community.home-assistant.io/t/time-clock/651151) | |
| Required = * | |
| domain: automation | |
| input: | |
| settings: | |
| name: "Settings *" | |
| icon: mdi:cog-outline | |
| collapsed: true | |
| input: | |
| timer_helper: | |
| name: Timer - Timer Helper * | |
| description: Select the timer helper to be used for all timers. | |
| Using a timer helper provides flexibility to start, pause, and cancel timers, persistence across reboots, and real-time monitoring, making your automations more robust and adaptable. | |
| For more information on how to create a timer helper [Click Here](https://community.home-assistant.io/t/651151/4?u=blacky) | |
| default: [] | |
| selector: | |
| entity: | |
| filter: | |
| domain: | |
| - timer | |
| entity_input: | |
| name: Entities To Turn ON * | |
| description: Specify the entities that will be turned ON by a start time and OFF after the set duration. | |
| default: [] | |
| selector: | |
| target: | |
| triggers: | |
| name: "Triggers" | |
| icon: mdi:clock-outline | |
| collapsed: true | |
| input: | |
| trigger_one_time: | |
| name: Timer One - Start Time | |
| description: Set the start time. | |
| default: 00:00:00 | |
| selector: | |
| time: | |
| trigger_one_duration: | |
| name: Timer One - Duration | |
| description: Set the duration for Timer One. | |
| default: 00:00:00 | |
| selector: | |
| duration: | |
| include_extra_triggers: | |
| name: Use The Extra Timers (Optional) | |
| description: Select any additional timers you want to include. | |
| default: [] | |
| selector: | |
| select: | |
| multiple: true | |
| options: | |
| - label: Use timer two | |
| value: "use_trigger_two" | |
| - label: Use timer three | |
| value: "use_trigger_three" | |
| - label: Use timer four | |
| value: "use_trigger_four" | |
| trigger_two_time: | |
| name: Timer Two - Start Time | |
| description: Set the start time. | |
| default: 00:00:00 | |
| selector: | |
| time: | |
| trigger_two_duration: | |
| name: Timer Two - Duration | |
| description: Set the duration for Timer Two. | |
| default: 00:00:00 | |
| selector: | |
| duration: | |
| trigger_three_time: | |
| name: Timer Three - Start Time | |
| description: Set the start time. | |
| default: 00:00:00 | |
| selector: | |
| time: | |
| trigger_three_duration: | |
| name: Timer Three - Duration | |
| description: Set the duration for Timer Three. | |
| default: 00:00:00 | |
| selector: | |
| duration: | |
| trigger_four_time: | |
| name: Timer Four - Start Time | |
| description: Set the start time. | |
| default: 00:00:00 | |
| selector: | |
| time: | |
| trigger_four_duration: | |
| name: Timer Four - Duration | |
| description: Set the duration for Timer Four. | |
| default: 00:00:00 | |
| selector: | |
| duration: | |
| weekdays: | |
| name: "Weekdays" | |
| icon: mdi:calendar-week | |
| collapsed: true | |
| input: | |
| include_weekdays: | |
| name: Use The Weekdays Option (Optional) | |
| description: This option adds a condition to operate only on specified weekdays. It applies globally to all start times. | |
| default: weekday_disabled | |
| selector: | |
| select: | |
| options: | |
| - label: Enable the weekday option | |
| value: "weekday_enabled" | |
| - label: Disable the weekday option | |
| value: "weekday_disabled" | |
| weekday_options: | |
| name: Weekdays | |
| description: Select the days of the week on which you want the automation to run. | |
| default: | |
| - mon | |
| - tue | |
| - wed | |
| - thu | |
| - fri | |
| - sat | |
| - sun | |
| selector: | |
| select: | |
| multiple: true | |
| mode: list | |
| options: | |
| - label: Monday | |
| value: "mon" | |
| - label: Tuesday | |
| value: "tue" | |
| - label: Wednesday | |
| value: "wed" | |
| - label: Thursday | |
| value: "thu" | |
| - label: Friday | |
| value: "fri" | |
| - label: Saturday | |
| value: "sat" | |
| - label: Sunday | |
| value: "sun" | |
| telegram: | |
| name: "Telegram (Optional)" | |
| icon: mdi:telegram | |
| collapsed: true | |
| input: | |
| telegram_notify: | |
| name: Use Telegram Notifications | |
| description: Enable or disable Telegram notifications for timer start and end. | |
| default: telegram_disabled | |
| selector: | |
| select: | |
| options: | |
| - label: Enable Telegram notifications | |
| value: "telegram_enabled" | |
| - label: Disable Telegram notifications | |
| value: "telegram_disabled" | |
| telegram_service: | |
| name: Telegram Notify Service | |
| description: > | |
| Enter the Telegram notify service (e.g., notify.telegram_bot). | |
| This field is required if notifications are enabled. | |
| default: "notify.telegram_bot" | |
| selector: | |
| text: | |
| telegram_start_message: | |
| name: Start Message | |
| description: Message sent when the timer starts. | |
| default: "⏲️ Timer started. Entities have been turned ON." | |
| selector: | |
| text: | |
| telegram_end_message: | |
| name: End Message | |
| description: Message sent when the timer finishes and entities turn OFF. | |
| default: "⏲️ Timer finished. Entities have been turned OFF." | |
| selector: | |
| text: | |
| mode: restart | |
| max_exceeded: silent | |
| variables: | |
| trigger_one_duration: !input trigger_one_duration | |
| entity_input: !input entity_input | |
| timer_helper: !input timer_helper | |
| trigger_one_time: !input trigger_one_time | |
| include_extra_triggers: !input include_extra_triggers | |
| trigger_two_time: !input trigger_two_time | |
| trigger_two_duration: !input trigger_two_duration | |
| trigger_three_time: !input trigger_three_time | |
| trigger_three_duration: !input trigger_three_duration | |
| trigger_four_time: !input trigger_four_time | |
| trigger_four_duration: !input trigger_four_duration | |
| include_weekdays: !input include_weekdays | |
| weekday_options: !input weekday_options | |
| telegram_notify: !input telegram_notify | |
| telegram_service: !input telegram_service | |
| telegram_start_message: !input telegram_start_message | |
| telegram_end_message: !input telegram_end_message | |
| triggers: | |
| - trigger: time | |
| at: !input trigger_one_time | |
| id: 't1' | |
| - trigger: time | |
| at: !input trigger_two_time | |
| id: 't2' | |
| - trigger: time | |
| at: !input trigger_three_time | |
| id: 't3' | |
| - trigger: time | |
| at: !input trigger_four_time | |
| id: 't4' | |
| - trigger: state | |
| entity_id: !input timer_helper | |
| to: "idle" | |
| id: 't5' | |
| # All Conditions | |
| condition: | |
| #Trigger conditions | |
| - condition: or | |
| conditions: | |
| - condition: and # trigger for ON and OFF state | |
| conditions: | |
| - condition: trigger | |
| id: | |
| - 't1' | |
| - condition: and | |
| conditions: | |
| - condition: trigger | |
| id: 't2' | |
| - "{{ 'use_trigger_two' in include_extra_triggers }}" | |
| - condition: and | |
| conditions: | |
| - condition: trigger | |
| id: 't3' | |
| - "{{ 'use_trigger_three' in include_extra_triggers }}" | |
| - condition: and | |
| conditions: | |
| - condition: trigger | |
| id: 't4' | |
| - "{{ 'use_trigger_four' in include_extra_triggers }}" | |
| - condition: and # trigger for end timer helper | |
| conditions: | |
| - condition: trigger | |
| id: 't5' | |
| # Check The Weekday Option | |
| - condition: or | |
| conditions: | |
| - "{{ include_weekdays == 'weekday_disabled' }}" | |
| - condition: and | |
| conditions: | |
| - condition: time | |
| weekday: !input weekday_options | |
| - "{{ include_weekdays == 'weekday_enabled' }}" | |
| - condition: trigger | |
| id: | |
| - 't5' | |
| action: | |
| - choose: | |
| - alias: "Check if the time helper is enabled (start timers)" | |
| conditions: | |
| - condition: trigger | |
| id: | |
| - 't1' | |
| - 't2' | |
| - 't3' | |
| - 't4' | |
| sequence: | |
| - alias: "Turn ON the entities" | |
| action: homeassistant.turn_on | |
| target: !input entity_input | |
| - choose: | |
| - alias: "Start timer helper for trigger one" | |
| conditions: | |
| - condition: trigger | |
| id: | |
| - 't1' | |
| sequence: | |
| - alias: "Turn ON the timer helper" | |
| action: timer.start | |
| entity_id: !input timer_helper | |
| data: | |
| duration: !input trigger_one_duration | |
| - alias: "Start timer helper for trigger two" | |
| conditions: | |
| - condition: trigger | |
| id: | |
| - 't2' | |
| sequence: | |
| - alias: "Turn ON the timer helper" | |
| action: timer.start | |
| entity_id: !input timer_helper | |
| data: | |
| duration: !input trigger_two_duration | |
| - alias: "Start timer helper for trigger three" | |
| conditions: | |
| - condition: trigger | |
| id: | |
| - 't3' | |
| sequence: | |
| - alias: "Turn ON the timer helper" | |
| action: timer.start | |
| entity_id: !input timer_helper | |
| data: | |
| duration: !input trigger_three_duration | |
| - alias: "Start timer helper for trigger four" | |
| conditions: | |
| - condition: trigger | |
| id: | |
| - 't4' | |
| sequence: | |
| - alias: "Turn ON the timer helper" | |
| action: timer.start | |
| entity_id: !input timer_helper | |
| data: | |
| duration: !input trigger_four_duration | |
| - choose: | |
| - alias: "Send Telegram notification on timer start" | |
| conditions: | |
| - condition: template | |
| value_template: "{{ telegram_notify == 'telegram_enabled' }}" | |
| sequence: | |
| - alias: "Telegram start notification" | |
| action: !input telegram_service | |
| data: | |
| message: !input telegram_start_message | |
| - alias: "Turn OFF entities after the timer helper is finished" | |
| conditions: | |
| - condition: trigger | |
| id: | |
| - 't5' | |
| sequence: | |
| - alias: "Turn OFF the entities" | |
| action: homeassistant.turn_off | |
| target: !input entity_input | |
| - choose: | |
| - alias: "Send Telegram notification on timer end" | |
| conditions: | |
| - condition: template | |
| value_template: "{{ telegram_notify == 'telegram_enabled' }}" | |
| sequence: | |
| - alias: "Telegram end notification" | |
| action: !input telegram_service | |
| data: | |
| message: !input telegram_end_message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment