Notify per email in 2024.6

I updated HA to 2024.06 today and got a message about notification changes. After looking into the docu I changed the email-notification of my automation to the following:

automation:

service: notify.send_message
data:
  entity_id: notify.testemail
  title: "Test"
  message: "Test"

And I have a “notify.testemail” entry in my configuration.yaml for platform smtp.

configuration.yaml:

notify:
  - platform: smtp
    name: testemail
    sender: [email protected]
    sender_name: "Test Sender"
    recipient: 
        - [email protected]
    server: server_name
    port: 25
    encryption: none
    timeout: 15

But it does not send mails.

With the same Update of HA the “file”-Integration was imported from my configuration.yaml to a “file”-Integration in the GUI. After Allowing the file-path to be writable that notification in my automation worked:

service: notify.send_message
data:
  entity_id: notify.test_log
  message: "Test"

What am I doing wrong, what is different between the two?

What documentation told you to do that?

It is incorrect. See the example here: https://www.home-assistant.io/integrations/smtp/#usage

I got two dashboard messages after the update: “file” integration was imported to HA UI and I should delete it from the configuration.yaml, and notify changes.

So my thoughts were the notify changes would apply to messages to files and to email messages. So am I wrong and the changes apply only to file-integration?

So far only some notification integrations have been changed. The plan is for all of them to be changed eventually but there are issues that are slowing the progress. SMTP has not been changed. File notifications have.

Seems I was wrong, old notify for email works again.

Thanks for the clarification.

I’ve had this configuration for a few years now:

notify:
  - name: sendemail
    platform: smtp
    server: smtp.gmail.com
    port: 587
    timeout: 15
    sender: [email protected]
    encryption: starttls
    username: [email protected]
    password: !secret gmail_password
    sender_name: Home Assistant
    recipient:
      - [email protected]

With this in an script file:

send_pic_seq:
  sequence:
  - service: notify.sendemail
    data:
      title: Motion Detection
      message: Alarm armed in basement {{ states('sensor.date_time') }}
      data:
        images:
        - /config/www/images/outbound/photo1.jpg

The script is called via an automation:

- id: '1586560528387'
  alias: picture on motion
  trigger:
  - entity_id: binary_sensor.basement_finished_motion_aq2
    platform: state
    to: 'on'
  action:
  - service: script.capture_pic_seq
    data_template:
      evEntity: camera.basement_camera
      evPath: /config/www/images/familyRoom/
      evTimeTag: '{{ states(''sensor.date'') }}-{{ states(''sensor.time'') }}'
  - service: script.send_pic_seq
    data: {}

This just stopped working giving an repair notice

picture on motion uses an unknown service
The automation "picture on motion" (automation.picture_on_motion) has an action that calls an unknown service: notify.sendemail.

This error prevents the automation from running correctly. Maybe this service is no longer available, or perhaps a typo caused it.

To fix this error, edit the automation and remove the action that calls this service.

Click on SUBMIT below to confirm you have fixed this automation.

So if nothing changed in HA, no error shows in logs, any thoughts on why this might have stopped working?

I’m running “2024.6.4” core.