Hope someone is able to assist me with regex issue. So I have got imap_email_content configured, and I am able to see the email sensor as well as email body under its attribute, all good! What I am trying to do is to get three template sensors created based on the highlighted below.
Relevant part of email message look like:
Dear Customers,
The daily operation of your power station as follows:
User ID:
xxxxxxxx Daily generation: 26.8kWh Month generation: 215.10000000000002kWh Total generation: 668.6999999999999kWh
Daily income:
0.0
Total income:
0.0
CO2 reduction:
666.69kg
Number of alarms:
0
Date:
2022/01/08
The following code is what I have been using, unfortunately not working.
template:
Then it implies that regex_findall_index does not support searching through more than a single line of text at a time. (Or there is some other error that prevented it from working.)
You may have noticed in regex101 that each regex pattern ends with /gm. The m means to search through multiple lines. As far as I know, these options, which determine how the search should be performed, aren’t accessible to users of regex_findall_index and your results suggest that it is not using the m option.