You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Instructions how to integrate imap email content sensor into Home Assistant."
5
+
date: 2016-09-09 12:30
6
+
sidebar: true
7
+
comments: false
8
+
sharing: true
9
+
footer: true
10
+
ha_category: Sensor
11
+
---
12
+
13
+
14
+
The `imap email content` sensor platform will read emails from an imap email server and report them as a state change within Home Assistant.
15
+
This is useful if you have a device that only reports its state via email.
16
+
17
+
To enable this sensor, add the following lines to your `configuration.yaml` file:
18
+
19
+
```yaml
20
+
# Example configuration.yaml entry
21
+
sensor:
22
+
- platform: imap_email_content
23
+
server: imap.gmail.com
24
+
port: 993
25
+
name: Emails
26
+
username: USERNAME
27
+
password: PASSWORD
28
+
senders:
29
+
- example@gmail.com
30
+
value_template: TEMPLATE
31
+
```
32
+
33
+
Configuration variables:
34
+
35
+
- **server** (*Required*): The IP address or hostname of the IMAP server.
36
+
- **port** (*Required*): The port where the server is accessible.
37
+
- **name** (*Optional*): Name of the IMAP sensor.
38
+
- **username** (*Required*): Username for the IMAP server.
39
+
- **password** (*Required*): Password for the IMAP server.
40
+
- **senders** (*Required*): A list of sender email addresses that are allowed to report state via email. Only emails recieved from these addresses will be processed.
41
+
- **value_template** (*Optional*): If specified this template will be used to render the state of sensor. If a template is not supplied the raw message body will be used for the sensor value. The following attributes will be supplied to the template:
0 commit comments