mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Fix link to documentation link, select read-only (#20155)
- Fixed link to documentation page at the top of the sensor - Select the IMAP4 Inbox read-only so that reading e-mail does not mark messages as Read
This commit is contained in:
committed by
Paulus Schoutsen
parent
9d112dc3f0
commit
c8efbb2cdc
@@ -2,7 +2,7 @@
|
|||||||
Email sensor support.
|
Email sensor support.
|
||||||
|
|
||||||
For more details about this platform, please refer to the documentation at
|
For more details about this platform, please refer to the documentation at
|
||||||
https://home-assistant.io/components/sensor.email/
|
https://home-assistant.io/components/sensor.imap_email_content/
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import datetime
|
import datetime
|
||||||
@@ -97,7 +97,7 @@ class EmailReader:
|
|||||||
"""Read the next email from the email server."""
|
"""Read the next email from the email server."""
|
||||||
import imaplib
|
import imaplib
|
||||||
try:
|
try:
|
||||||
self.connection.select()
|
self.connection.select('Inbox', readonly=True)
|
||||||
|
|
||||||
if not self._unread_ids:
|
if not self._unread_ids:
|
||||||
search = "SINCE {0:%d-%b-%Y}".format(datetime.date.today())
|
search = "SINCE {0:%d-%b-%Y}".format(datetime.date.today())
|
||||||
|
Reference in New Issue
Block a user