Hi, all.
I’m having some difficulty with smtp notifications and am looking for some help.
I’m running the latest version of HA on an RPi 3B+.
There are 2 problems I’m facing:
- The first problem is that I can’t figure out how to get multiple notifiers configured and working roperly.
Below is a section of my configuration.yaml file followed by a section from my automation.yaml file. You can see there are 3 notifiers seet up in configuration.yaml, all attempting to use the Google smtp server but sending to different recipients. The ‘name’ element is supposed to allow me to call services like ‘notify.jeff_phone’ or ‘notify.jeff_work’ in the automation.yaml file. Howver, the only service call that works at all is simply ‘notify.notify’, and then only the first notifier is used. - The second problem is with multiple recipients in a notifier and this appears in the first notifier, below. There are both a regular email address and an email address that sends a text to my phone configured as recipients. Only the phone notification is working, not the regular email notification.
Anybody got any ideas on whawt I’m doing wrong?
Thanks.
Jeff
# Email notifications using gmail.
notify:
- name: jeff_phone
platform: smtp
server: smtp.gmail.com
port: 587
timeout: 15
sender: <name>@gmail.com
encryption: starttls
username: <name>@gmail.com
password: !secret notify_jeff_password
recipient:
- <recipient_1>@comcast.net
- <phone>@mymetropcs.com
sender_name: My Home Assistant
debug: true
- name: jeff_work
platform: smtp
server: smtp.gmail.com
port: 587
timeout: 15
sender: <name>@gmail.com
encryption: starttls
username: <name>@gmail.com
password: !secret notify_jeff_password
recipient:
- <recipient_2>@yahoo.com
sender_name: My Home Assistant
debug: true
- name: jeff_email
platform: smtp
server: smtp.gmail.com
port: 587
timeout: 15
sender: <name>@gmail.com
encryption: starttls
username: <name>@gmail.com
password: !secret notify_jeff_password
recipient:
- <recipient_3>@comcast.net
sender_name: My Home Assistant
debug: true
- alias: Notify - Exterior Door Opened
description: ''
trigger:
- platform: state
entity_id: binary_sensor.front_door_sensor
from: 'off'
to: 'on'
condition:
condition: state
entity_id: person.jeff
state: 'not_home'
action:
- service: notify.notify
data_template:
title: "HA Exterior Door Notification"
message: "{{ trigger.from_state.attributes.alias }} has been opened."