As said, very little detail. We at least need to see what you tried and the exact error you got.
That said, you don’t need any conditions. Just trigger on the state being 2 and set an input datetime helper to now() (via a call service action in the UI).
Sorry about the lack of detail in my original post. I have tried ‘date’, ‘datetime’, and a few others that I found on the forum, now I have tried ‘now()’ and I get the following error no matter what
I don’t use the UI for many things, but try it like this: {{ now() }} (with the datetime option). Otherwise, this with the timestamp option: {{ now().timestamp() }}.
I had to end up editing in YAML mode, but it does work. I feel like the HA GUI is super lacking and most people have just accepted that you have to do everything via YAML.