I want to trigger a switch at a specific time point. This time point is valid only once and should be defined from lovelace ui. How can I implement this?
Create an input_datetime, add the time sensor to your config, and use those two in a template in your automation trigger (there’s an example on the first page I linked).
Also turn the automation itself off in the action:
section to ensure it only fires once.
Thanks for your answer. But this solution has one caveat. You can have only one input_datetime
integration. But I need at least twice.
Did you read the docs? You can have more than one input_datetime.
OK. after trying some configuration variants I got the trick. But the documentation is very misleading. It is not obvious that only_date
or only_time
are example strings. It seems these are some syntactical elements.
The second paragraph in the docs is meant to imply that:
To add three datetime inputs to your installation, one with both date and time, and one with date or time each, add the following lines to your
configuration.yaml
:
If you have any suggestions on how that could be clearer, you can definitely share them (or you can even edit the document yourself by clicking the “edit this page on GitHub” link in the upper right).