mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 05:46:52 +00:00
Added docs for email sensor (#950)
* added docs for email sensor * renamed to imap email content * added missing file
This commit is contained in:
parent
691de07b76
commit
d7230032fc
46
source/_components/sensor.imap_email_content.markdown
Normal file
46
source/_components/sensor.imap_email_content.markdown
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Imap E-mail Content"
|
||||
description: "Instructions how to integrate imap email content sensor into Home Assistant."
|
||||
date: 2016-09-09 12:30
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
ha_category: Sensor
|
||||
---
|
||||
|
||||
|
||||
The `imap email content` sensor platform will read emails from an imap email server and report them as a state change within Home Assistant.
|
||||
This is useful if you have a device that only reports its state via email.
|
||||
|
||||
To enable this sensor, add the following lines to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: imap_email_content
|
||||
server: imap.gmail.com
|
||||
port: 993
|
||||
name: Emails
|
||||
username: USERNAME
|
||||
password: PASSWORD
|
||||
senders:
|
||||
- example@gmail.com
|
||||
value_template: TEMPLATE
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **server** (*Required*): The IP address or hostname of the IMAP server.
|
||||
- **port** (*Required*): The port where the server is accessible.
|
||||
- **name** (*Optional*): Name of the IMAP sensor.
|
||||
- **username** (*Required*): Username for the IMAP server.
|
||||
- **password** (*Required*): Password for the IMAP server.
|
||||
- **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.
|
||||
- **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:
|
||||
|
||||
* **from**: The from address of the email
|
||||
* **body**: The body of the email
|
||||
* **subject**: The subject of the email
|
||||
* **date**: The date and time the email was sent
|
Loading…
x
Reference in New Issue
Block a user