Notifications inconsistently working

Really could use some guidance - spent 2 days reading/researching/experimenting and just can’t figure this out. Using version 0.69.1.

Issue: Using door sensors to detect when doors are opened, and I’m calling a notify service (pushbullet in my case). It will work fine for an hour or so, with notifications reaching my phone and laptop. If I leave for a few hours, notifications fail with this message:

Invalid service data for notify.kevin_phone: extra keys not allowed @ data['Message']. Got 'Floor 1 north sliding door open'
required key not provided @ data['message']. Got None

I’ve only used the GUI-based automations editor to create the automations. Here’s the content from automations.yaml for this item:

- id: '1526759524848'
  alias: 'Notification: Floor 1 North Sliding Door'
  trigger:
  - entity_id: binary_sensor.sensor_2
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Floor 1 north sliding door open
    service: notify.kevin_phone

Why would the notifications work sometimes but return an error other times?

Please edit your post and format your code as explained in the blue banner at the top of this page.

Thanks, this was my first post so I’m a bit unfamiliar with the process.
I believe I’ve placed the markups correctly.

This is saying that your automation has the key “Message” and it shouldn’t. The issue with “Message” is that it is capitalized. The automation you are showing here looks correct.

So I have 2 questions,

  1. what type of device/component are you using for notification?
  2. Is this the only automation you use that notifies with the phrase ‘floor 1 north sliding door open’?

Reason for question 1 is this could be a bug in the component because your yaml looks like it’s formatted correctly. Maybe the component you are using is using .Capitalize() incorrectly at times. Doesn’t make sense for a component to do that but the error is directly calling out “Message” with a capital m.

question 2 is to verify that you don’t have a second automation with the typo where you have a capital M for message.

Thanks for your reply.

  1. My notification is to Pushbullet. About half of my automations are working, sending notifications when doors are opened, and another half are not. All of these devices are the same model Ecolink Door/Window Sensor, using Z-Wave.

  2. My entire automations.yaml file is posted below. Being a novice with HA, I have been using the GUI-based automations editor only. I have opened the automations.yaml file for copying the content but not for making modifications.

- id: '1526756108974'
  alias: 'Notification: Floor 1 South Sliding Door'
  trigger:
  - entity_id: binary_sensor.sensor
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Floor 1 south sliding door open
    service: notify.kevin_phone
- id: '1526757618448'
  alias: 'Notification: Garage Door'
  trigger:
  - entity_id: zwave.linear_gd00z4_garage_door_opener_remote_controller
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Garage Door Open
    service: notify.kevin_phone
- id: '1526759524848'
  alias: 'Notification: Floor 1 North Sliding Door'
  trigger:
  - entity_id: binary_sensor.sensor_2
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Floor 1 north sliding door open
    service: notify.kevin_phone
- id: '1526759760639'
  alias: 'Notification: Floor 1 Deck Side Door'
  trigger:
  - entity_id: binary_sensor.sensor_5
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Floor 1 side door is open
    service: notify.kevin_phone
- id: '1526759906337'
  alias: 'Notification: Floor 1 Garage Side Door'
  trigger:
  - entity_id: binary_sensor.sensor_6
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Floor 1 garage side door open
    service: notify.kevin_phone
- id: '1526760109551'
  alias: 'Notification: Basement North Sliding Door Open'
  trigger:
  - entity_id: binary_sensor.sensor_3
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Basement north sliding door open
    service: notify.kevin_phone
- id: '1526760173957'
  alias: 'Notification: Basement South Sliding Door Open'
  trigger:
  - entity_id: binary_sensor.sensor_4
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Basement south sliding door open
    service: notify.kevin_phone
- id: '1526760809210'
  alias: 'Notification: Home Assistant Power Up'
  trigger:
  - event: start
    platform: homeassistant
  condition: []
  action:
  - data:
      message: Home Assistant has started
    service: notify.kevin_phone

As you can see, all the automations are just notifications … no complex logic or conditions. I’m trying to crawl before I walk with HA. If I can get the notifications working then I’ll build from there.

An automation that works is “Notification: Floor 1 South Sliding Door”. I tried checking for weird characters or spelling/syntax issues, but haven’t noticed any difference. The door sensors are correctly changing state when I open and close the door, and the automations are triggering. The issue is that some return the error while others work fine.

they all look good to me. Are there any other errors in the log? Try turning on debug, be warned though, it’s verbose.

Don’t you enclose the message in " or ’ ? Or is it a copy-paste error?

The quotes appear to be there in the Automation editor:

Thanks, I’ll give that a try.