Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait for trigger optional timeout issue #19360

Open
4 tasks done
a-nicholls opened this issue Jan 10, 2024 · 5 comments
Open
4 tasks done

wait for trigger optional timeout issue #19360

a-nicholls opened this issue Jan 10, 2024 · 5 comments

Comments

@a-nicholls
Copy link

a-nicholls commented Jan 10, 2024

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

I'm having problems with wait for trigger in automation where it fails to run as expected or wait for the trigger to actually be called.

When having a wait for trigger in an automation action
image

If you don’t touch the timeout (optional) I think you are ok, but if you change it and even change it back to the default value of all 0’s and click on show in Edit in YAML

wait_for_trigger:
  - platform: state
    entity_id:
      - binary_sensor.lg_h850_interactive
    to: "off"
    for:
      hours: 0
      minutes: 0
      seconds: 10
continue_on_timeout: false
timeout:
  hours: 0
  minutes: 0
  seconds: 0
  milliseconds: 0

it shows the timeout section, so this has the effect of not waiting for the trigger. You may as well have a if condition for that.

If I edit out the timeout in the YAML and save the automation it does wait for the trigger as expected.
e.g.

wait_for_trigger:
  - platform: state
    entity_id:
      - binary_sensor.lg_h850_interactive
    to: "off"
    for:
      hours: 0
      minutes: 0
      seconds: 10
continue_on_timeout: false

You can’t revert back the value in the visual editor and it isn’t obvious whether it has a value set other than going into the YAML editor. Shouldn’t it be set so that if the value is 0 (or no value) for all those it should clear out the timeout section?

Clearing out the values in the visual editor doesn't remove it either.

Describe the behavior you expected

Without having to revert to viewing the YAML, having a way to indicate that the timeout is not set or clearing the value. Is a value of all 0's valid for a wait for trigger?

Steps to reproduce the issue

  1. Create Automation with Wait for Trigger
  2. Change value of time out and save
  3. Go back in and try and revert value back so that it is optional (clear out or zero)
  4. Notice YAML view still shows hours minutes and seconds timer of 0
    ...

What version of Home Assistant Core has the issue?

core-2024.1.2

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

120.0.2210.121 (Official build) (64-bit)

Which operating system are you using to run this browser?

Windows 11 23H2

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@a-nicholls
Copy link
Author

To add the trigger may work outside a repeat loop, but the underlying issue is it's not obvious in the visual editor it's no longer the optional empty value than a hours minutes and seconds of 0.

Copy link

github-actions bot commented Apr 9, 2024

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 has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 9, 2024
@karwosts
Copy link
Contributor

karwosts commented Apr 9, 2024

unstale

@srescio
Copy link

srescio commented Apr 26, 2024

Think i experienced the same, here my automation error
Screenshot_2024-04-26-08-37-12-397_io homeassistant companion android

@srescio
Copy link

srescio commented Apr 26, 2024

This issue has been opened earlier though it failed to catch attention, there is a similar thread with more comments on home-assistant/core#109586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants