So far it looks fine… except, as the error says, your automation needs an action.
In the future please do not post screen shots of configuration text. No one wants to transcribe your configuration. Instead follow community guidelines and post the actual YAML, properly formatted.
If you need a primer on how to transcribe YAML automation configurations that you find here on the forums using the UI Automation Editor, there is a (now slightly dated) tutorial available on the Resin Chem Tech Youtube channel.
I’m new, so still learning both ways. I was able to finally finish the automation, and each incoming email triggers the smart socket. Is there a way to restrict this to the specific Subject of the email only?
I need to activate my smart socket if the email with the subject line “New Project created” is received. Currently, this code triggers a socket on every email.
If this is a method you plan to use for other automations, you should go ahead and set up a trigger-based Template sensor for email content as shown in the linked docs.
If this is more of a one-off, you can use the Event trigger and trigger variables from the docs directly as your automation’s trigger and conditions.
Let us know which of those options makes sense for your case, then we can help you modify your automation appropriately.
I would say it’s a one-time automation for this device (project) So far I have, which doesn’t seem to work, I can see the Trigger being triggered but the socket is not turning on.
It looks like you’ve mashed together too many things…
You have assigned two triggers that will likely be firing in close succession, but left the automation mode set to single so only the first of the two will actually be processed. Since the base IMAP sensor-based trigger will not return the specific trigger variables you need, there is no reason to use it.