Services in notify.yaml broken with 2024.6

I have a number of services defined in the notify.yaml file to send texts and emails vial a Gmail account and application password. As of a couple of weeks ago every automation and script that calls one of these services errors out with a message like this:

The automation “Front doorbell detects motion” (automation.front_doorbell_detects_motion) has an action that calls an unknown service: notify.gmail_smtp_text

notify.gmail_smtp_text is defined in notify.yaml

Code? :wink: :slight_smile: Please post the yaml from the automation and from your notify.yaml. Have you tried enabling debug logs for notifications?

# Example configuration.yaml entry
logger:
  default: info
  logs:
    homeassistant.components.notify: debug

From my script:

service: notify.gmail_smtp_text
data:
message: “”
title: >-
Frontdoor camera has been triggered {{ now().strftime(“%-m.%-d.%Y %-I:%M:%S
%p”) }}
data:
images:
- /config/www/tmp/FrontdoorCameraMotionTrigger.jpg

From notify.yaml:

  • name: “gmail_smtp_text”
    platform: smtp
    server: smtp.gmail.com
    port: 587
    timeout: 15
    sender_name: “Home Assistant Notification”
    sender: !secret emailFrom
    encryption: starttls
    username: !secret emailUser
    password: !secret emailPwd
    recipient:
    • !secret emailCc
    • !secret emailBcc

As a note this has been working for months and just stopped a couple of weeks ago.

I added the entry for logging. Which log would I look at?

Please post the code formatted, it is, unfortunately, very important in YAML, because we can’t see, if there are indentation errors in your code. :+1:

See here:

The logger needs a HA restart to work. :wink: You can find the entries (if any) in the normal HA log that you can find under Settings > System. :slight_smile:

And you’re really sure, that your authentication works, or as you said, it doesn’t get that far? This should have nothing to do with the error message, but who knows… Just as a precaution, please check again that your credentials are working.

This is really strange. I had changed the username and password in the secrets.yaml file because we were having an issue receiving text messages through Verizon. I had commented out the original lines and added new ones. Tonight I uncommented out the original ones and commented out the new ones.There must have been some kind of syntax error there because when I restarted HA the original four smtp services once again showed up. I don’t know why a syntax error in the secrets file would affect the notify in that manner.

I now have a different problem. I added two additional smtp services to the notify.yaml to use a different mail server and user/password. After starting HA the two new services do not show up. I renamed one of the originals, restarted HA and it showed up with the new name. This has me puzzled.