Core: Time pattern minutes divisible by number greater than 60 not working as expected

Created on 21 Apr 2020  路  6Comments  路  Source: home-assistant/core

The problem


Time pattern minutes is working with numbers greater than 60 but not as intented.
I'm trying to do an automation that runs every hour and half (/90 minutes), but is running each hour.

Environment

  • Home Assistant Core release with the issue: 0.108.5
  • Last working Home Assistant Core release (if known): NA
  • Operating environment (Home Assistant/Supervised/Docker/venv): Hass.io
  • Integration causing this issue: time pattern
  • Link to integration documentation on our website: https://www.home-assistant.io/docs/automation/trigger/#time-pattern-trigger

Problem-relevant configuration.yaml

trigger:
- platform: time_pattern
  minutes: /90    

Traceback/Error logs


Additional information

Instead of counting current minutes (0-60), minute count should be for all day (0-1440),
(hour * 60) + minute

automation

Most helpful comment

it's time to have "crontab" like trigger ;)

All 6 comments

Hey there @home-assistant/core, mind taking a look at this issue as its been labeled with a integration (automation) you are listed as a codeowner for? Thanks!

That is not how it works. In that case /50 should trigger at 0:50 and 1:40 (every 50 minutes) but it is actually meant to trigger at 0:50 and 1:50 (any hh:50).

It would probably be good to reject intervals above 59 to avoid this confusion.

it's time to have "crontab" like trigger ;)

That would help as well. Having two triggers like:

# At minute 0 past every 3rd hour from 10 through 23.
0 10/3 * * *

# At minute 30 past every 3rd hour from 11 through 23.
30 11/3 * * *

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

So @Adminiuga should I update to ask crontab trigger?

Was this page helpful?
0 / 5 - 0 ratings