lorcott
(Scott)
August 17, 2022, 5:46pm
1
I have a motion sensor with the binary sensor
binary_sensor.x10_on_off_sensor_x10_a_04
.
I cannot figure out how to build an automation to trigger a tone or chime on an Alexa/Echo dot. Should be simple but I can’t seem to make it happen. Any fantastic/wonderful peeps out there that might be able to assist?
thanks in advance.
s
rossk
August 17, 2022, 6:12pm
2
What have you tried so far?
Can you share an automation you have tried and that you can’t get get to work so we can see where you might be going wrong?
lorcott
(Scott)
August 17, 2022, 7:14pm
3
- id: '1659882445615'
alias: Scott Office Motion in Office
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.x10_on_off_sensor_x10_a_02
from: 'false'
to: 'true'
condition: []
action:
- service: media_player.volume_set
data:
volume_level: 0.5
target:
area_id: scott_s_office
- service: notify.alexa_media_scott_s_office
data:
data:
type: announce
method: all
message: .
mode: single
ddaniel
(Daniel Dekovic)
August 17, 2022, 7:20pm
4
Are you using ha cloud? How did you integrated Alexa in ha?
lorcott
(Scott)
August 17, 2022, 7:21pm
5
Using cloud. Alexa Media Player and Home Assistant Skill
ddaniel
(Daniel Dekovic)
August 17, 2022, 7:23pm
6
You can use notify service. To test it go to developer tools, services and search for notify. It should give you your alexa device. Test it there if it works just call it in automation.
finity
August 17, 2022, 9:04pm
7
try changing your trigger:
trigger:
- platform: state
entity_id:
- binary_sensor.x10_on_off_sensor_x10_a_02
from: 'off'
to: 'on'
lorcott
(Scott)
August 18, 2022, 1:42am
9
So this works, kinda…I can only get it to work with announce. I’d like it to use the Alexa sound effect chime.
- id: '1659882445615'
alias: Scott Office Motion in Office
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.x10_on_off_sensor_x10_a_02
from: 'off'
to: 'on'
condition: []
action:
- service: media_player.volume_set
data:
volume_level: 0
target:
area_id: scott_s_office
- service: notify.alexa_media_scott_s_office
data:
message: a
data:
type: announce
ie.
{
"entity_id": "media_player.CHANGE_ME_TO_YOUR_DEVICE",
"media_content_id": "amzn_sfx_doorbell_chime_01",
"media_content_type": "sound"
}
but I’m not sure how to parse this into an automation.yaml. ugggg!
finity
August 18, 2022, 11:15am
10
try this:
action:
- service: media_player.play_media
data:
entity_id: media_player.CHANGE_ME_TO_YOUR_DEVICE
media_content_id: "amzn_sfx_doorbell_chime_01"
media_content_type: "sound"
lorcott
(Scott)
August 18, 2022, 12:21pm
11
Unfortunately there is NOTHING now…
- id: '1659882445615'
alias: Scott Office Motion in HALL
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.x10_on_off_sensor_x10_a_02
from: 'off'
to: 'on'
condition: []
action:
- service: notify.alexa_media_scott_s_office
data:
entity_id: media_player.scott_s_office
media_content_id: amzn_sfx_doorbell_chime_01
media_content_type: sound
it did work with TTS but not with the doorbell.
lorcott
(Scott)
August 18, 2022, 12:23pm
12
whoops … found a type on the service. making good progress.
lorcott
(Scott)
August 18, 2022, 1:15pm
13
so the code works with a manual RUN ACTION, but for some reason the trigger is NOT working. Also, I had the wrong sensor listed early…it is correct now _01.