Help with imap_email_content

I added this to my conf yaml file:

sensor:
  - platform: imap_email_content
    server: imap.hostinger.com
    name: alarm_status
    port: 993
    username: [email protected]
    password:1234
    senders:
      - [email protected]
    value_template: >-
      {% if 'arm' in subject %}
        alarm_armed
      {% elif 'disarm' in subject %}
        alarm_disarmed
      {% endif %}

Now, I don’t know what to do next to make the status appear on the overview page. Please help this newbie!

Add the entity (sensor.alarm_status ) to an entities card or a glance card.

To start, go to the Home Assistant Overview page, click the three dots at the top right of the screen and select ‘Edit Dashboard’. Then click the blue ‘+ Add Card’ icon at the bottom right and select a card to add.

Thanks for the help. I found I had the wrong password!

I changed the logic to:

 {% if 'Disarm' in subject %}
        alarm_disarmed
      {% elif 'Arm' in subject-%}    
        alarm_armed
      {% else -%}
        alarm_unknown
      {% endif %}

But when I get the email that alarm is armed, it is not changing to alarm_armed, stays at alarm_disarmed. BTW, what does -% do?

Well, changed to alarm_armed, but took about 5 minutes. But, then changed back to alarm_disarmed…
How often does it check for a new message?

I interpreted this:

to mean, “how do I put the sensor on a Lovelace dashboard.”

Did you mean to ask “why isn’t my sensor showing the correct sate?”

It does not check. The state is pushed to home assistant by the email server:

yes, why doesn’t it show the correct state?

:man_shrugging:

I switched it over to gmail and changed the security level, and now it works fine!

So just a slow email server then.