mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-17 06:16:50 +00:00
Info about Gmail App Password and X-GM-RAW example (#15274)
Co-authored-by: Franck Nijhof <frenck@frenck.dev>
This commit is contained in:
parent
716d32f2c7
commit
44ff153609
@ -62,6 +62,17 @@ charset:
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
### Gmail with App Password
|
||||
|
||||
If you’re going to use Gmail, it’s always good practice to create a [App Password](https://support.google.com/mail/answer/185833?hl=en).
|
||||
|
||||
1. Go to your [Google Account](https://myaccount.google.com/)
|
||||
2. Select **Security**
|
||||
3. Under “Signing in to Google” select **App Passwords**
|
||||
4. Sign in to your Account, and create a new App Password for Gmail.
|
||||
|
||||
You can now use this as your password for Gmail, in your configuration.
|
||||
|
||||
### Configuring IMAP Searches
|
||||
|
||||
By default, this integration will count unread emails. By configuring the search string, you can count other results, for example:
|
||||
@ -81,6 +92,8 @@ sensor:
|
||||
username: YOUR_USERNAME
|
||||
password: YOUR_PASSWORD
|
||||
search: FROM <sender@email.com>, SUBJECT <subject here>
|
||||
# Or use X-GM-RAW search-term like this, to find unread emails from the last 7 days in your inbox
|
||||
# search: "X-GM-RAW 'in: inbox newer_than:7d is:unread'"
|
||||
|
||||
# Example configuration.yaml entry for Office 365
|
||||
sensor:
|
||||
|
Loading…
x
Reference in New Issue
Block a user