Yes, the capitalisation/spacing is correct. If I copy this into my nofiy script under "device: " it works perfectly.
I’d never used the listen to events before.
So with my notify service as
- name: ga_broadcast_specific_device
platform: rest
resource: !secret assistant_relay_url
method: POST_JSON
data_template:
user: "Home Assistant"
broadcast: "true"
talkback: "false"
command: "{{ message }}"
device: "Living Room speaker"
Calling a service such as
message: hello
This works perfectly and sends to the Living Room speaker
However, changing my notify service to
- name: ga_broadcast_specific_device
platform: rest
resource: !secret assistant_relay_url
method: POST_JSON
data_template:
user: "Home Assistant"
broadcast: "true"
talkback: "false"
command: "{{ message }}"
device: "{{ device }}"
And calling it as so
message: hello
data:
device: Living Room speaker
Does not work. It runs the notify service and broadcasts “hello” but isnt picking up the device and just goes across all devices.
When listening to this, as you have directed me too I dont even get a message broadcast.
Im not sure im using it correctly though, I get the below output
Event 0 fired 16:19:
{
"event_type": "notify.ga_broadcast_specific_device",
"data": {
"message": "hello"
},
"origin": "REMOTE",
"time_fired": "2021-02-21T16:19:13.972671+00:00",
"context": {
"id": "11bef2xxxxxxxx65697",
"parent_id": null,
"user_id": "4f3eafbcxxxxxxxx58713ff3"
}
}
From running this script
However, the script doesnt actually fire and I get a message saying its fired, regardless of what name of notify service i put in the event?