I use gmail search strings for imap sensors, works great (for english). One usage case is, I get a notification when my Amazon packages have been delivered (and/or are enoute to be delivered soon)
Example of Working Search String
search: 'X-GM-RAW "from:[email protected] newer_than:12h subject:Example Email Subject"'
However, it fails when I need to use the french accents, as I live in a french speaking area of North America. The exact search string I need to use is:
'X-GM-RAW "from:[email protected] newer_than:12h subject:Votre commande a été livrée"'
The problem is with the french accents in these words: été livrée
As soon as I add that to the search string, the sensor just remains in the state: unknown
The error in the log is:
Logger: homeassistant.components.imap.sensor
Source: components/imap/sensor.py:141
Integration: imap (documentation, issues)
First occurred: 1:00:30 PM (1 occurrences)
Last logged: 1:00:30 PM
Can't parse IMAP server response to search 'X-GM-RAW "from:[email protected] newer_than:200h subject:Votre commande a été"': BAD / b'Could not parse command'
It seems HA can not parse non-ascii strings? Does anyone know how to resolve this issue? Thankyou.
(As for now, I have a work around by searching for specific, non-accented, and thus ascii, text in the body of the email. It works, but is not ideal)