Skip to content
To enable notification by e-mail in your installation, add the following to your E-mail address of the recipient of the notification.
To use it you have to setup at least one notification target (notifier), check the integrations list for one that fits your use case..
which need special attention. By default, the usage by external applications, especially scripts, is limited. This can be a recipient address or a list of addresses for multiple recipients.SMTP server which is used to send the notifications.The timeout in seconds that the SMTP server is using.Password for the SMTP server that belongs to the given username. First off on the list is SMTP or “Simple Mail Transfer Protocol”. To get started you need an SMTP server, there are a few options. Home Assistant :: Home Assistant Send Mail Gmail SMTP 1.
If a template is not supplied the message subject will be used for the sensor value.
A sample configuration entry for Google Mail. Visit the This is useful if you have a device that only reports its state via email. It’s recommended to enable STARTTLS, if possible.Keep in mind that if the password contains a colon, it needs to be wrapped in apostrophes in the For Google Mail (smtp.gmail.com) an additional step in the setup process is needed. Instructions on how to add e-mail notifications to Home Assistant.
Email is great for routine reports of your setup. Configuration. If you have 2-step verification enabled on your Google account, you’ll need to use To use the SMTP notification, refer to it in an automation or script like in this example:This platform is fragile and not able to catch all exceptions in a smart way because of the large number of possible configuration combinations.A combination that will work properly is port 587 and STARTTLS.
The notify integration makes it possible to send notifications to a wide variety of platforms.
The imap_email_content integration will read emails from an IMAP email server and report them as a state change within Home Assistant. If you want to send notifications to the Home Assistant web interface, you may use the Persistent Notification integration. In this example, we will be extracting energy use, cost, and billed amount from an email (from Georgia Power) and putting it into sensor values using a template sensor that runs against our IMAP email sensor already set up. Emails can be an important part of a notification scheme for your Home Automation platform. Google has some extra layers of protection
Config configuration.yaml You could use … If the password contains a colon it need to be wrapped in apostrophes.Sets a custom ‘sender name’ in the emails headers (Keep in mind that Google has some extra layers of protection which need special attention (Hint: ‘Less secure apps’). This is the protocol for sending emails. You probably don’t want to get an email when you’re window opens, but it might make sense to get an Email once a week with any devices that have a low battery that need replacing. The following attributes will be supplied to the template.The following example shows the usage of the IMAP email content sensor to scan the subject of an email for text, in this case, an email from the APC SmartConnect service which tells whether the UPS is running on battery or not.The same template structure can scan the date, body or sender for matching text before setting the state of the sensor.This example shows how to extract numbers or other formatted data from an email to change the value of a template sensor to a value extracted from the email. Only emails received from these addresses will be processed.If specified this template will be used to render the state of the sensor.
To enable this sensor, add the following lines to your A list of sender email addresses that are allowed to report state via email. A sample of the body of the email used is below:Below is the template sensor which extracts the information from the body of the email in our IMAP email sensor (named sensor.energy_email) into 3 sensors for the energy use, daily cost, and billing cycle total.By making small changes to the regular expressions defined above, a similar structure can parse other types of data out of the body of other emails.