I'm struggling with is trying to set up a dashboard card to use my Alexa devices to do an Announcement/Broadcast with an input field for what I want announced.
I have Alexa Media Player, Piper, and Wyoming Protocol installed . My Alexa echo devices are detected.
I have 2 helpers:
Alexa Broadcast Text - input_text.alexa.broadcast.text
Alexa Device Selector - input_select.alexa.device.selector - This has Options whose names match the names of my devices (e.g. "Basement" which would align with media_player.basement_alexa).
I have 1 script:
action: notify.alexa_media
data:
target: >
{% if is_state('input_select.alexa_device_selector', 'Basement Alexa') %}
- media_player.basement_alexa
{% elif is_state('input_select.alexa_device_selector', "Twin's Room Alexa")
%}
- media_player.twin_s_room_alexa
{% endif %}
message: "{{ states('input_text.alexa_broadcast_text') }}"
data:
type: announce
My dashboard card is a vertical stack with the broadcast text input field, device selector dropdown box, and a "send alexa announcement" button.
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_text.alexa_broadcast_text
- entity: input_select.alexa_device_selector
- show_name: true
show_icon: false
type: button
entity: script.send_alexa_announcement
tap_action:
action: perform-action
perform_action: script.send_alexa_announcement
target: {}
title: Alexa
Thanks in advance.