Excellent news, well done, opens up all the skills unsupported directly in HA.
What would be the best way to add a lovelace card to send typed in commands in the same way as you can send TTS with mini media player?
Excellent news, well done, opens up all the skills unsupported directly in HA.
What would be the best way to add a lovelace card to send typed in commands in the same way as you can send TTS with mini media player?
I don’t really do lovelace, but perhaps this example can be adapted. If someone figures out, please update the wiki.
Cheers, I’ll have a play.
Good day, thank you very much for adding yet another fantastic functionality to this component.
I can now do this and for instance turn off all preset alarms on a calendar change.
- service: media_player.play_media
data:
entity_id: media_player.sofia_echo_dot
media_content_id: turn off all alarms
media_content_type: custom
however, it wont do the opposite. i.e. media_content_id: turn on all alarms doesn’t follow through.
is that likely a “prevent disturbance” functionality in Alexa?
Thank you again
may not be exactly what you’re looking for, but this may help:
Create respective input_text.<echo_name> and below automation.
Just add the input text to your lovelace
- id: notify_execute_stt
alias: Notify execute stt
initial_state: true
trigger:
- platform: state
entity_id:
- input_text.sofia_echo
- input_text.living_echo
- input_text.master_echo
- input_text.bruno_echo
condition: []
action:
- service: media_player.play_media
data:
entity_id: media_player.{{trigger.entity_id.split(".")[1].split("_")[0]}}_echo_dot
media_content_id: '{{trigger.to_state.state}}'
media_content_type: custom
Hey Alan,
Wonderful to see there is so much headway being made with this component.
I’m having trouble getting my head around what exactly this new feature command does?
I guess, is it different to Keatons actionable notifications I’ve just recently set up?
Or, perhaps because I’m having trouble with actionable notifications on my Facebook portal, could I use this new feature to implement to same outcomes?
Get asked a question, illicit a positive response for an action etc without the custom Alexa skill?
Cheers
Linton
You must be overthinking it In a nutshell, anything you could only do by directly speaking to an echo, you can now do from HA too, even control smart devices that there is currently no HA integration for.
Works a treat thanks, that’s exactly what I was looking for Just need to tidy up the card a bit and job’s a good one.
Like the way you extracted the media_player name from the input_text.
Nice work on this
After setting up @juan11perez’s suggestion I got a bit carried away trying pretty up the lovelace card and ended up adapting the example you linked to, now have…
As per the example, this uses… https://github.com/gadgetchnnel/lovelace-text-input-row
First set up ‘input_text.alexa_command’ and ‘input_select.target_echo’ with names of your echos.
Next set up a script…
send_alexa_command:
alias: Send Alexa command
sequence:
- service: media_player.play_media
data:
entity_id: "{{ states('input_select.target_echo') }}"
media_content_id: "{{ states('input_text.alexa_command') }}"
media_content_type: custom
and finally the card…
entities:
- entity: input_text.alexa_command
name: Alexa command
type: 'custom:text-input-row'
- entity: input_select.target_echo
name: Alexa device
- action_name: Send
icon: 'mdi:voice'
name: ' '
service: script.send_alexa_command
type: call-service
type: entities
I have a lovelace configuration for alexa . Have a look at my github page
This lets you enter text for speech, text for commands, select sound effects and adjust volume. Just substitute my alexa names for yours
Lovelace screens in the lovelace folder alexa.yaml is the one you need
automations in the automation folders all automations starting alexa* controls the lovelace screen
It uses input_text, input_number and input_select, these can be found in yaml files in the config folder
There a video in the Video folder to show you what it looks like
Did you find a solution to this? I want to play Radio 4 in the UK however it’s not possible to play on TuneIn due to BBC restrictions as TuneIn will not share usage data… I was expecting to find a “BBC” media type
media_content_type: BBC
ooohhhhhh ok, I get it now. Your image below really helped me understand thank you.
So we can now send commands to an echo without speaking to it.
Brilliant
I would imagine this would be super handy for things like Tuya devices that refuse to flash or integrate.
Being able to send any command to Alexa - brilliant! Working perfectly for me except for setting a timer. Alexa replies back that she is setting the timer - but no timer actually gets set. Anyone else seeing the same thing?
Spot on
As a example for my own set up, the Alexa skill for my FireTV Stick allows direct access to certain functions my Harmony and the HA integration don’t so now I can set up an emulated_roku automation to send the Alexa command and then add that to an Activity on my Harmony.
Have dug out an old Dot and muted it to send commands to when I don’t want to hear the acknowledgement.
Just tried it on a Dot and a Show of mine and setting and cancelling timers works fine.
As you can see I got it sussed but thanks for the info, will check out the other bits you have it doing.
Just a comment for timers. If I use “numbers” for the command (as example: 2 minutes), Alexa reply “how many time” for the timer. If I use letters (string) (“two minutes”) then Alexa apply the timers properly. No idea if it is related with my language zone.
It’s weird - everything else I send to Alexa via this method works - but not the timer.
When I send this:
Alexa responds with: “30 seconds, starting now” - but no timer is set.
try with type: announce
Basically it looks ok to me