home-assistant.io/source/_components/sensor.imap.markdown
Marcelo Moreira de Mello 10317da550 Updated documentation to match with voluptuous config validation
--
After the upgrade to use voluptuous to parse the configuration, sensor.imap needs to pass username instead user. Note that user also works, but to keep it coherent, we are updating the documentation.

(home_assistant) ↪ hass --script check_config
Testing configuration at /home/hass/.homeassistant
16-08-28 00:49:35 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [sensor.imap]: required key not provided @ data['username']. Got None
Failed config
  sensor.imap:
    user: <redacted>
    port: 993
    platform: imap
    password: <redacted>
    server: imap.gmail.com
    name: Gmail Alerts

Successful config (partial)
  sensor.imap:

   After replacing ```user``` by ```username```, ```hass --script check_config``` works as expected.
2016-08-28 00:53:11 -04:00

1016 B

layout, title, description, date, sidebar, comments, sharing, footer, ha_category, ha_release
layout title description date sidebar comments sharing footer ha_category ha_release
page IMAP Unread E-mail Instructions how to integrate IMAP unread email into Home Assistant. 2016-07-11 06:00 true false true true Sensor 0.25

The imap sensor platform is observing your IMAP server and reporting the amount of unread emails.

To enable this sensor, add the following lines to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: imap
    server: imap.gmail.com
    port: 993
    name: Emails
    username: USERNAME
    password: PASSWORD

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.