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

[Feature Request] Allow delay in automation #368

Open
jardleex opened this issue Sep 11, 2024 · 2 comments
Open

[Feature Request] Allow delay in automation #368

jardleex opened this issue Sep 11, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jardleex
Copy link

I'd like to have a delay option in (certain?) automation's.

My setup

  • WARP2 Pro with NFC auth (and OCPP)
  • evcc which consumes NFC tag IDs to determine the EV connected
  • iobroker
  • larger roof solar installation

My use case

After a car was connected simulate a NFC tag after X seconds or minutes. Background is convenience when charging our EV so nobody has to present an NFC tag to the box. Just connect and leave.
The time delay is to allow me to present a different tag I use to charge guest vehicles.
I differentiate the vehicles in my charger and evcc (via tag id). evcc gives nice percentage values of how much electricity came from my roof and how much the charge costs.

I haven't thought or looked into the other automation options and thus can't say if a delay option would make sense there too.

@rtrbt
Copy link
Member

rtrbt commented Sep 12, 2024

Moving this to the esp32-firmware git.

@rtrbt rtrbt transferred this issue from Tinkerforge/warp-charger Sep 12, 2024
@rtrbt rtrbt added the enhancement New feature or request label Sep 12, 2024
@rtrbt
Copy link
Member

rtrbt commented Sep 12, 2024

Add "delay" to automation/config array members (default 0), then check for the delay in Automation::trigger() and schedule a task if it is not 0. This should automagically work for all types of triggers and actions, but we should probably block the trigger until the delay is elapsed to make sure we don't spam tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants