Commit Graph

81 Commits (2f227677b61960d135d1c7b3ed8b57e0f9eb554f)

Author SHA1 Message Date
vexofp 617b045727
Fix SSLCipherList typing error in IMAP coordinator (#105362) 2023-12-08 21:34:01 -10:00
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Jan Bouwhuis 4da77d2253
Use more specific exception type for imap decoding (#104227)
* Use more specific exception type for imap decoding

* Only catch ValueError
2023-11-20 19:55:10 +01:00
Jan Bouwhuis 9a38e23f28
Fix imap does not decode text body correctly (#104217) 2023-11-19 20:15:02 +01:00
Jan Bouwhuis 78f827697e
Remove imap_email_content integration (#101233) 2023-10-02 08:57:16 +02:00
Jan Bouwhuis e84a4661b0
Add intial property to imap_content event data (#100171)
* Add initial property to imap event data

* Simplify loop

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* MyPy

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-12 18:54:32 +02:00
Jan Bouwhuis b815ea1332
Revert "Remove imap_email_content integration" (#99713) 2023-09-06 11:54:18 +02:00
Jan Bouwhuis c64d173fcb
Remove imap_email_content integration (#99484) 2023-09-05 21:50:51 +02:00
Jan Bouwhuis a1307e117d
Add additional debug logging for imap (#98877) 2023-08-24 01:02:52 +02:00
Marc Mueller 71d985e4d6
Use asyncio.timeout [i-n] (#98450) 2023-08-15 14:32:15 +02:00
Erik Montnemery 045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Jan Bouwhuis fab3c5b849
Fix imap cleanup error on abort (#97097) 2023-07-23 20:30:15 +02:00
Jan Bouwhuis 65ebb6a74f
Improve imap error handling for config entry (#96724)
* Improve error handling config entry

* Removed CancelledError

* Add cleanup

* Do not call protected async_set_state()
2023-07-17 09:44:47 +02:00
J. Nick Koston 085eebc903
Make async_set_state in ConfigEntry a protected method (#96727)
I added this in #77803 but I never designed it to be called
externally. External usage may break at any time because the
class is not designed for this. I should have made it protected
in the original PR but I did not think it would get called
externally (my mistake)
2023-07-17 08:58:12 +02:00
c0ffeeca7 79c6b773da
IMAP service strings: Fix typo (#96711)
Fix typo
2023-07-16 21:19:04 +02:00
Jan Bouwhuis 72458b6672
Add feature to turn off using IMAP-Push on an IMAP server (#96436)
* Add feature to enforce polling an IMAP server

* Add test

* Remove not needed string tweak

* Rename enforce_polling to enable_push

* Push enabled by default
2023-07-14 21:26:35 +02:00
Jan Bouwhuis 8b6d2fc3ce
Remove unreachable template validation for imap config flow (#94862) 2023-06-19 20:20:10 +02:00
Jan Bouwhuis ce8217acf5
Explicitly opt-in to device name in the imap integration (#94861) 2023-06-19 19:58:41 +02:00
Jan Bouwhuis 5e55f83cbc
Correct imap sensor measurement class and add suggested precision (#94060)
* Fix imap sensor measurement class and precision

* Test measurement class is set correctly

* Remove unrelated changes

* Move EntityDescription to module level
2023-06-16 00:44:58 +02:00
Jan Bouwhuis 3adea14ddb
Use TemplateSelector on imap custom imap_content event template config option (#94429)
Use TemplateSelector for imap custom template
2023-06-12 06:30:23 +02:00
Jan Bouwhuis 7a195b5291
Fix imap crash on email without subject (#94230) 2023-06-08 11:11:12 +02:00
Rami Mosleh 07e26f9639
Drop codeowner for IMAP (#94033) 2023-06-04 11:59:03 -05:00
Jan Bouwhuis 1e0770ff8a
Add ssl_verify option to imap integration (#93811)
* Add ssl_verify option to imap integration

* Add test
2023-05-30 19:48:47 +02:00
Jan Bouwhuis 74741c7634
Fix imap advanced settings not shown (#93813) 2023-05-30 20:37:07 +03:00
Jan Bouwhuis 4c0d169cfc
Fix imap parsing non rfc compliant date crash (#93630)
* Fix imap parsing non rfc compliant date crash

* Use parsedate_to_datetime from mail.utils
2023-05-28 13:28:11 +02:00
Jan Bouwhuis 1b5d207984
Add imap custom event data template (#93423)
* Add imap custom event template

* Add template validation
2023-05-25 11:05:25 +02:00
Jan Bouwhuis 5bc825a8ab
Add advanced imap option to set custom event max message size (#93163) 2023-05-22 12:14:06 +02:00
Jan Bouwhuis c97e0f11a5
Fix last imap message is not reset on empty search (#93119) 2023-05-15 21:15:10 +02:00
Jan Bouwhuis 53e533af6b
Improve and enforce type hints for imap (#92325) 2023-05-05 19:21:57 +02:00
Jan Bouwhuis 5a78684998
Fix large imap_content event warning by truncating the email text body to 2 KiB (#92066) 2023-04-26 18:44:22 +02:00
Jan Bouwhuis f6d8859dd2
Add codeowner for imap integration (#92067) 2023-04-26 18:21:58 +02:00
Jan Bouwhuis 3f6541a6db
Add cipher list option to IMAP config flow (#91896)
* Add cipher list option to IMAP config flow

* Use client_context to get the ssl_context

* Formatting

* Add ssl error no make error handling more specific

* Make ssl_ciper_list an advanced option
2023-04-24 15:37:21 +02:00
Jan Bouwhuis 6becf523ec
Fix error after losing an imap connection (#90966)
Cleanup first after losing an imap connection
2023-04-06 16:46:32 -04:00
Jan Bouwhuis 94817f61e5
Suppress imap logging on reconnect and presume state (#90826) 2023-04-05 12:18:16 +02:00
Jan Bouwhuis 9b03d331ca
Fix recovering imap connection triggers re-auth (#90762) 2023-04-04 12:59:57 +02:00
Jan Bouwhuis 580b20b0a8
Deprecate imap_content_sensor (#90429)
* Deprecate imap_content_sensor

* Rename unique_id to issue_id

* Migrate config to imap entry

* Improve dialogs

* Improve dialog texts

* Add repairs.py to .coveragerc

* Test the integration component setup

* Text tweak

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use flow for creating entries

* Rename schema add tests

* Patch client instead

* Add tests repairs - refactor async_step_confirm

* Comments test, correct calling next step

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-03 07:27:41 +02:00
epenet f7925763a4
Make abort_entries_match available in options flow (#90406)
* Make abort_entries_match available in options flow

* Add tests

* Exclude ignore entries and add test

* Move to OptionsFlow

* Adjust tests

* Use mock_config_flow

* Use AbortFlow

* Remove duplicate code
2023-03-29 17:20:51 +02:00
Jan Bouwhuis 93e1cd8dd8
Add header with parsed date to imap event data (#90422) 2023-03-28 22:50:25 +02:00
Jan Bouwhuis 24d0d15f38
Implement imap_content event for imap integration (#90242) 2023-03-28 21:02:43 +02:00
Jan Bouwhuis fd3280260d
Remove unreachable continue statement in imap push coordinator (#90361) 2023-03-27 16:39:51 +02:00
Jan Bouwhuis 5b3c57ff1e
Add option flow for imap integration (#89914)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-27 11:47:22 +02:00
Jan Bouwhuis a773c37190
Cleanup name assignment imap sensor (#90306) 2023-03-27 08:33:46 +02:00
Jan Bouwhuis 1e64a55a1a
Add missing translation for invalid imap folder (#90154)
Add missing translation for invalid folder
2023-03-23 08:08:52 +01:00
Jan Bouwhuis 51b12cbf96
Add user_input as suggested value in imap config flow (#89982)
Add user_input as suggested value to config_schema
2023-03-20 15:52:54 +01:00
Jan Bouwhuis e4275a053c
Remove yaml import from imap integration (#89981)
* Remove yaml import from imap integration

* Cleanup sensor code and strings.json
2023-03-20 15:52:07 +01:00
Jan Bouwhuis 5f22796b38
Refactor imap coordinator (#89759)
* Warn if the previous push wait task it taking longer than the update interval

* refactor

* Call _async_fetch_number_of_messages first

* Add cleanup in case fetching fails

* mypy

* Set sensor to unknown if an error occured.

* Handling invalid auth an reraise when needed

* Handle invalid folder as setup error

* Close IMAP stream before logout at cleanup

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-17 22:45:15 +01:00
Jan Bouwhuis 6ba5f8e43a
Fix imap server push holding HA startup (#89750) 2023-03-15 21:22:13 +01:00
Erik Montnemery 90d7fb8418
Sort manifests 5 (#87026) 2023-02-08 20:35:25 +01:00
Franck Nijhof 939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action 0f80932709 [ci skip] Translation update 2023-02-02 00:25:01 +00:00