Core: Time_pattern automation triggers only reading the first digit.

Created on 20 Sep 2020  路  7Comments  路  Source: home-assistant/core

The problem

I have a cuckoo clock automation that uses time_pattern as a trigger. It seems as though it triggers correctly but then retriggers after three minutes. It is shown in the logbook. Here is a link to the automation: Cuckoo.yaml
image

Environment

  • Home Assistant Core release with the issue: 0.115.2
  • Last working Home Assistant Core release (if known): 0.114.x
  • Operating environment (OS/Container/Supervised/Core): Container
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml


Cuckoo.yaml

  trigger:
    - platform: time_pattern
      hours: '*'
      minutes: '0'
    - platform: time_pattern
      minutes: '30'

Traceback/Error logs


Additional information

automation

Most helpful comment

Confirmed, numbers given as strings are treated as a list of each digit. I will fix that.

All 7 comments

Testing theory that it might only be reading the first digit from the second trigger '3' by changing it to 50 to see if it triggers 5 minutes after the hour.

Confirmed. It triggered on the hour and then again at the 05 mark (instead of 50 like the yaml says)
image
Going to test without the quotes to see if there is a different result.

Removing the quotes in the YAML solves the issue. Not sure if that is satisfactory to close the issue on the HA Side..but it's a fine resolution for me.
A dev can close this issue if they are satisfied with the workaround/solution.

Working fine here without quotes, but ui automation editor saves with quotes, so still a bug

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

Looks like issue also happens with "hours" trigger. My Vacuum turned itself on at 01:02 (night) instead of 12:26(day). That was not a good way to wake up.

Confirmed, numbers given as strings are treated as a list of each digit. I will fix that.

Was this page helpful?
0 / 5 - 0 ratings