Please anyone help me with automation trigger

good day
I’m a beginner with sonoff, homeassistant and scripting
I know I will be funny for most, but I will still ask:

it is possible to set the automation trigger in the sense of:

if the date is from - to start automation every 5 minutes?
For example, help template?

So far, I can only think of very complicated ones:
Automation 1. - every 5 minutes - condition: date from - to; action run script
script: start automation 2.

Perhaps it would be better if you explained what you are trying to accomplish. Your question is quite confusing.

Time pattern triggers are rarely the most efficient way of using home assistant. Much better to use states.

I need to run automation every 5 minutes between April 1st and September 30th inclusive

Then do this;

Trigger: 5minute time pattern

Condition: date range.

Actions: what you want to do. No need for another automation or script.

aha, that’s new to me.
I’m going to meet. Thank you for now.

I don’t know if it will help me, I need to repeat the automation every year. so I will enter only the day and month of the beginning and the day and month of the end …

  - condition: template # Only between April 1 and September 30
    value_template: "{{ 4 <= now().month <= 9 }}"

This automation is still going to trigger every 5 minutes all year though, wether it passes the condition and executes the actions or not. As I said earlier, this is not an efficient use of home assistant. If you explain what you are trying to do there may be a better way.

1 Like

Trigger on temperature and put everything else in the conditions.

1 Like

ohh …
easy …
like …
Thank you

  alias: 100 Hlavní vypínač topení
  description: Venkovní teplota pod 18°C, září až květen, ruční ovládaní . HDO.
  - below: '18'
    entity_id: sensor.weather_temperature
    for: '12:00:00'
    platform: numeric_state
  - entity_id: input_boolean.rucni_spinac_topeni
    for: 00:00:05
    from: 'off'
    platform: state
    to: 'on'
  - condition: or
    - condition: and
      - condition: state
        entity_id: #not physically available at this time - ordered
        state: ON HDO
      - condition: template
        value_template: '{{ 9 <= now().month <= 4 }}'
    - condition: state
      entity_id: input_boolean.rucni_spinac_topeni
      state: 'on'
  - data: {}
    entity_id: input_boolean.hlavni_vypinac_topeni
    service: input_boolean.turn_on

it will probably be necessary …
I’m not sure when the “Main heating switch” will turn on if the on-off of the second auxiliary switch is inadvertently switched on