IMAP Email Content - Can't work with 2 sensors?

Hello,

Been tearing my hair out on this one, I’ve had a working IMAP sensor for my alarm working for a while, and wanted another one to work the same for my UPS (emails sent via Synology NAS). Spent ages getting the UPS one working - seemed to not work if my search criteria for the subject was too long, but got to the bottom of it. Now the alarm sensor has vanished, showing on lovelace as not found and doesn’t exist when looking for the entity. Can there only be one? Surely not.
Config pasted below.

Thanks in advance!

sensor:
  - platform: imap_email_content
    server: outlook.office365.com
    name: alarm_status
    port: 993
    username: REDACTED 
    password: REDACTED
    senders:
      - REDACTED 
    value_template: >-
      {% if 'Alarm Set' in subject %}
        Armed
      {% elif 'Alarm Un-Set' in subject %}
        Disarmed
      {% elif 'Alarm Stopped' in subject %}
        AlarmStopped
      {% elif 'Alarm Sounding' in subject %}
        AlarmSounding
      {% elif 'Mains Power Lost' in subject %}
        MainsLost
      {% elif 'Mains Power Restored' in subject %}
        MainsRestored
      {% elif 'Device Missing' in subject %}
        Offline
      {% endif %}
      
      
sensor:
  - platform: imap_email_content
    server: outlook.office365.com
    name: network_ups_status
    port: 993
    username: REDACTED 
    password: REDACTED 
    senders:
      - REDACTED 
    value_template: >-
      {% if 'battery mode' in subject %}
        Battery
      {% elif 'AC mode' in subject %}
        Mains
      {% elif 'low battery' in subject %}
        NAS_Shutdown
      {% elif 'connected' in subject %}
        Mains            
      {% endif %}