mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Reset imap email content state if no email (#35123)
* no-message: If there is no message at all, replace internal state * Apply proposed change * apply black
This commit is contained in:
parent
5218b23fce
commit
541b666a86
@ -230,6 +230,8 @@ class EmailContentSensor(Entity):
|
||||
email_message = self._email_reader.read_next()
|
||||
|
||||
if email_message is None:
|
||||
self._message = None
|
||||
self._state_attributes = {}
|
||||
return
|
||||
|
||||
if self.sender_allowed(email_message):
|
||||
|
Loading…
x
Reference in New Issue
Block a user