I am trying to adapt what seems to be a rather wonderful blueprint from bbbenji - a water leak detection and notification automation.
The only change I want to make is to have multiple devices notified, instead of the one only in the blueprint.
Still not sure I have got my head around editing imported blueprints, but what I have done is copied blueprint config after running it and copying the trace, and then created a new automation. I am not even sure this is valid method, but when I try to save the new automation, I get an error.
I did set up a notification group in my config.yaml file - and this may or may not be part of the problem:
notify:
- name: mobiles_plus_alexas
platform: group
services:
- service: mobile_app_one
- service: mobile_app_two
- service: alexa_media
data:
target:
- media_player.blah1_echo_dot
- media_player.blah2_echo_dot
- media_player.blah3_echo_dot
- media_player.blah1_echo_show
- media_player.blah4_echo_dot
- media_player.blah5_echo_dot
data:
type: tts
The automation I have “recreated” is as follows:
trigger:
- event_data: {}
event_type: state_changed
platform: event
condition:
- condition: template
value_template: '{{ trigger.event.data.new_state.attributes.device_class == "moisture" }}'
- condition: template
value_template: '{{ trigger.event.data.new_state.state == "on" }}'
action:
- service: notify.mobiles_plus_alexas
message: >-
{{ trigger.event.data.new_state.attributes.friendly_name }} has detected a
leak.
title: Leak detected!
mode: single
id: '1691912876748'
alias: Leak detection & multiple notifications
The error I get when I try to save it is:
Message malformed: extra keys not allowed @ data['rigger']
Can anyone tell me what I am doing wrong - possibly multiple things ?