Hi all
I have tried many options to get the REST sensor to read my EMail Headers. HA keeps giving me “REST result could not be parsed as JSON”
This is the JSON File:
{
"email": [
{
"data": [
{
"Date: Thu, 18 Jan 2024 08:00:27 +0000, From: =?utf-8?Q?Communica=20Marketing?= <[email protected]>, Subject: =?utf-8?Q?Empower=20Your=20Industry=3A=20Discover=20Our=20Latest=20Gateway=20Solutions=21?="
},
{
"Date: Sun, 21 Jan 2024 16:16:36 +0200 (SAST), From: <[email protected]>, Subject: SOM"
},
{
"Date: Sun, 21 Jan 2024 16:18:14 +0200 (SAST), From: Gia <[email protected]>, Subject: Follow up"
},
]
}
]
}
- authentication: basic
resource: http://x.x.x.x:xxx/htdocs/email.txt
headers:
content-type: "application/json"
scan_interval: 15
timeout: 5
sensor:
- name: my_email_headers
json_attributes_path: $.data
json_attributes:
- data
#value_template: "{{ value_json.data }}"
value_template: NA