Commit Graph

105 Commits (2e155f4de518de5e13fab3c8a5acdd9f03d2d028)

Author SHA1 Message Date
Jan Bouwhuis 8bc5a798ca
Fix IMAP config entry setup (#116797) 2024-05-04 13:18:26 -05:00
Marc Mueller a0314cddd4
Fix invalid tuple annotations (#116035) 2024-04-23 16:02:16 +02:00
J. Nick Koston f3a3e6821b
Switch imap push coordinator to use eager_start (#115454)
When I turned on eager_start here the data would always end up being
None because _async_update_data always returned None. To fix this
it now returns the value from the push loop. It appears this race
would happen in production so this may be a bugfix but since
I do not use this integration it could use a second set of eyes
2024-04-12 09:14:35 +02:00
Luca Angemi fc1ebdaaa3
Add config message items selector to imap option flow (#115108)
* Update const.py

* Update config_flow.py

* Update coordinator.py

* Update coordinator.py

* Update strings.json

* Update config_flow.py

* Update const.py

* Update coordinator.py

* Update config_flow.py

* Update config_flow.py

* Update test_diagnostics.py

* Update const.py

* Update test_init.py

* Update test_diagnostics.py

* Update test_diagnostics.py

* Update test_diagnostics.py

* Update test_init.py

* Update test_diagnostics.py

* Update test_init.py

* Update test_diagnostics.py

* Update test_diagnostics.py

* Update test_diagnostics.py

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_init.py

* Update const.py

* Only make text and headers optional

* Add message data tests

* Add message data test

* Update test_config_flow.py

* Update test message data

* Fix ruff

* Fix ruff

* Update test_init.py

* Update strings.json

---------

Co-authored-by: jbouwh <jan@jbsoft.nl>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-04-08 19:34:50 +02:00
Jan Bouwhuis 8b5177e989
Add IMAP fetch service (#115127)
* Add IMAP fetch service

* Fix docstr
2024-04-08 09:50:28 +02:00
Jan Bouwhuis c270ab0059
Correct duplicate word in IMAP translations (#115132) 2024-04-07 19:29:19 +02:00
J. Nick Koston 166910f587
Make eager_start default to True for async_create_background_task (#114996) 2024-04-06 09:53:50 -10:00
Jan Bouwhuis fa47e79292
Correct typo in IMAP translation (#115032) 2024-04-06 18:37:54 +02:00
Øyvind Matheson Wergeland fdef3ece13
Fix placeholder quotes (#114974)
* When quoting placeholders, always use double quotes so Lokalise recognizes the placeholder.

* Ensure that strings does not contain placeholders in single quotes.

* Avoid redefining value

* Moved string_with_no_placeholders_in_single_quotes

* Define regex once

* Fix tests
2024-04-06 13:01:56 +02:00
Sid 0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Jan Bouwhuis d66145358a
Correct imap services setup (#114760)
* Correct imap services setup

* Add config schema
2024-04-03 18:40:59 +02:00
Jan Bouwhuis 83b56ab005
Add IMAP seen, move and delete service (#114501)
* Add seen, move and delete IMAP services

* Add entry_id to the imap_content event data

* Use config validation library

* Add tests

* Add logging

* Typo in docstr

* Add guard
2024-04-02 23:05:05 +02:00
Sid 6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Luca Angemi 54c5f18aac
Add `uid` attribute to `imap_content` event data (#114432)
* Add uid to imap event

* Add ´uid´ to tests

* Update test_init.py
2024-03-29 15:04:24 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Marc Mueller 8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05:00
Erik Montnemery 52e7912caf
Migrate integrations i-m to generic flowhandler (#111863) 2024-02-29 20:08:46 +01:00
Jan Bouwhuis 8aa4157290
Add entry diagnostics to imap integration (#109460) 2024-02-09 11:30:27 +01:00
Marc Mueller 7a89e58873
Use builtin TimeoutError [e-i] (#109679) 2024-02-05 12:00:37 +01:00
Jan Bouwhuis 7ab1cdc2b3
Move nested code to class level as static method in imap coordinator (#109665)
* Move _decode_payload to module level in imap coordinator

* Make static method
2024-02-05 08:59:03 +01:00
Jan Bouwhuis 7cc0b8a2fe
Fix imap message part decoding (#109523) 2024-02-04 21:25:14 +01:00
J. Nick Koston 5177d022e8
Switch imap to use async_update_reload_and_abort helper (#108935) 2024-01-26 22:55:26 -05:00
Jan Bouwhuis c3da51db4e
Icon translation for imap mail count sensor (#108576) 2024-01-21 14:57:00 +01:00
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