When I ask Alexa to start TV it works but when I ask Alexa to turn it off, the Turn_Off_TV script is not getting called.
In the logbook, it seems like asking Alexa to turn off the TV is only deactivating the Turn_On_TV scene but not calling the second scriptâŚ
This is what I see in the logbook: [I ask Alexa to turn on TV]
Amazon Alexa sent command Alexa.SceneController/Activate for Turn_On_TV triggered by service script.turn_on
Turn_On_TV started triggered by service script.turn_on
Turn_On_TV turned on triggered by service script.turn_on
Harmony Hub Activites changed to Watch TV
Harmony Hub turned on triggered by service script.turn_on
[I ask Alexa to turn off the TV]
Turn_On_TV turned off
Any clues on how to get Alexa to run the Turn_Off_TV script when I ask it?
Iâm not sure that you actually need script in home assistant for alexa to turn on/off tv. I can turn my tv on or off using alexa without any script in home assistant. Just ask alexa to turn on or off tv by calling tv by itâs name used by alexa.
Hi,
Iâm not just turning on TV but my cable box, AV amplifier through the Harmony Activity. The script basically enables me to run all the actions configured within Harmony Hub. Home Assistant is not able to manage my cable tv box directly since I donât have any IR device set up outside of Harmony Hub.
Hi.
Alexa is probably confusing the scripts. I would suggest one of these two approaches:
Make a routine for each script and set a specific command. Alexa usually prioritizes these commands.
Make a TV entity in Home Assistant through Universal Media Player. Here you can combine all the services you need into one entity, which you expose to Alexa. You can see an example for a Harmony remote at the bottom of the docs I linked.
I believe you need to âturn on scriptsâ even if it is the turn off the TV etc. For the Harmony it is usually a call service, script.turn_on and the data would be âPowerOffâ (no space).
Option 1 worked:
I renamed my scripts to something more obscure to avoid duplicates and created 2 routines to call the specified scripts within the Alexa app.