so i know for a while now my hotmail doesnt work for imap anymore and i wanted to get back to using it for like deliveries
so i set up my hotmail account to forward the email to my gmail account…
and i also setup my imap gmail… and it works says i got like 7500 emails but they not all emails they just promotion and all that other crap you get…
so that part works
but the sensor part isnt working
ive tried these 2 ways and i only getting unknown
- trigger:
- trigger: event
event_type: "imap_content"
id: "Fedex Delivery Content"
event_data:
sender: "[email protected]"
intial: true
#sender: "[email protected]"
sensor:
- name: Fedex Delivery
state: >-
{% if 'Your package has been received!' in trigger.event.data["subject"] %}
received
{% elif 'Your package has been delivered!' in trigger.event.data["subject"] %}
delivered
{% elif 'Your order has been delivered!' in trigger.event.data["subject"] %}
delivered
{% elif 'shipment is on the way' in trigger.event.data["subject"] %}
on_the_way
{% elif 'Your package is now out for delivery today' in trigger.event.data["subject"] %}
out_for_delivery
{% endif %}
- trigger:
- trigger: event
event_type: "imap_content"
id: "mike Emailed"
event_data:
sender: "[email protected]"
sensor:
- name: mike Emailed2
state: "{{ trigger.event.data['sender'] }}"
now the email i forwarded from Fedex is the subject is
Fw: Your shipment is on the way
now id like to be able to search in the email if its Fedex or UPS etc as it only forwards the title and i cant search for the email address
but i cant seem to get it to work…what i doing wrong its been a year since i used the IMAP when hotmail stopped working so i been out of using it i looked at the examples and seems ok but something not working
so in the time of writing all this the 2nd part worked on its own
the
sensor.mike_emailed2 returns the value of [email protected]
but the other sensor is still not returning the state its still unknown
i tried this and i still get uknown it doesnt seem to like the subject
- trigger:
- trigger: event
event_type: "imap_content"
id: "mike Emailed3"
event_data:
sender: "[email protected]"
sensor:
- name: mike Emailed3
state: "{{ trigger.event.data['subject'] }}"