What's the easiest way to run an automation every hour and a half?

This is a community platform, not a customer service, we are doing our best to help. So, I am sharing my personal experience and my thought, so, if it works perfect, if not, i will learn something new. I do not have any obligation to be sure 100% correct/valid/tested other than good intentions. If you are looking for answers which are tested/validated, I will not be able to share them and you are free to discard my messages.

1 Like

thanks for explanation, I see that it will not sum the values, rather use individuals one. I will experiment locally.

Your reply only needed to be “No, didn’t test it.” However, that was evident from the fact you proposed using the Time Pattern Trigger when amelchio, one of Home Assistant’s developers, already explained it couldn’t be used to repeat every 90 minutes. Yet you proposed it anyway (10 months later). :man_shrugging:

Nowhere in the documentation does it suggest the options are additive.

i checked the code pointers, bear with me;

so, you are right, it will be triggered in next 30 minutes or next 1 hour, it will not use all parameters as a bundle.

please safely discard my messages, you are free to do, nothing enforces other way around.

The “danger” is that people will stumble across your recommendations and waste time trying to get them to work. If I ever suggest something that turns out to be wrong (not unknown :wink: ) I go back and edit the post to clarify my error (recent example).

1 Like

You are also free to delete/correct your original post to prevent misleading other people from believing your proposal works.

1 Like

i can definitely agree on this, you are right

If you agree then delete/correct your original two posts to prevent misleading other users.

all other people, I will continue to post with good intentions and propose possible solutions. I do not have any enforcement to update/delete any historical messages. Enjoy your Friday and relax.

This might have issues when there is downtime happening like updating hass or electric outage. Rather than taking mod, i would go with greater comparison.

Hopefully you will do research and read what others wrote (like amelchio’s post) before proposing “solutions” that are known to not work. As the saying goes, the road to hell is paved with “good intentions”.

3 Likes

I don’t think that i can go over all previous messages before posting any possible solution, there are threads with more than 500 messages, reading all of them is not scalable. I will continue what i am doing and discard your proposal.

why not trigger time_pattern every 10 minutes or so, and have a template condition for the time since the last trigger >90 minutes?

1 Like

I tried to come up similar here (What's the easiest way to run an automation every hour and a half? - #11 by fuatakgun) and it should not require to be called for every 10 minutes. It is a bit duplicated because last triggered attribute can be empty if this is a fresh new automation.

no, thats a template trigger.
using the time_pattern is much easier, and doesn’t waste resources, because if the template isn’t met, the action isn’t executed.

automation:

  - alias: excute per 90 minutes
    id: excute per 90 minutes
    trigger:
      - platform: time_pattern
        minutes: /5
        seconds: 00
    condition:
      - >
          {{(now() - state_attr('automation.execute_per_90_minutes','last_triggered).total_seconds() > 5400}}
    mode: restart
    action:
      - service: 

something like that

1 Like

Amelchio’s post was the fifth one before yours. There were only two dozen posts in this thread so it wasn’t a hardship to read it and learn what you proposed wouldn’t work.

1 Like

In that case:

trigger:
  - platform: time_pattern
    minutes: "/30"
condition: "{{ (now().hour*60+now().minute)%90==0 }}"

I’ve no idea if that is any less resource-intensive than my prior attempt.

6 Likes

Yes, dismissed again

Well hardly, you read and replied to the post.

Fact is you didn’t bother reading this thread (you admitted that much) and then suggested something that was established ten months ago to fail.

Instead of simply admitting it was a mistake to do that (we all make mistakes) you continue to defend it and believe it is helpful to post defective proposals. Very odd.

3 Likes