All,
New here and racking my brain here on why the YAML editor is giving me this error and others when I’m trying to create this notification automation. I basically want to have a push notification sent when the attribute “errorMessage” for “vacuum.chopper” changes from null to some other value and I want to push the error message and the time to a notify group.
The push notification is working, but not with the data pulled form the entity’s attributes. I can’t seem to get the formatting correct.
Error
missed comma between flow collection entries at line 120, column 63:
... vacuum.chopper', 'friendly_name') }} is reporting ":" {{ state_a ...
^
Automation
- id: '1631847434654'
alias: Automower Notifications
description: Advise me when Chopper is having issues
trigger:
- platform: state
entity_id: vacuum.chopper
attribute: errorMessage
for:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
condition:
- condition: not
conditions:
- condition: state
entity_id: vacuum.chopper
attribute: errorMessage
state: null
action:
- service: notify.all_devices
data:
message: {{ state_attr('vacuum.chopper', 'friendly_name') }} is reporting ":" {{ state_attr('vacuum.chopper', 'errorMessage') }} at {{ state_attr('vacuum.chopper', 'errorTime') }}
title: Automower Error
mode: single
State Attributes:
battery_level: 38
battery_icon: mdi:battery-40
mode: MAIN_AREA
activity: MOWING
state: IN_OPERATION
errorMessage: null
errorTime: null
nextStart: null
action: NO_SOURCE
restrictedReason: NOT_APPLICABLE
statusTimestamp: '2021-09-17 10:26:09'
friendly_name: Chopper
icon: mdi:robot-mower
supported_features: 12380