I am trying to set some custom of automatons to verbally open apps via Alexa on my PlayStation 4. I have created the automation and Alexa sees then and I can manually trigger within the HA portal, however when saying “Alexa, turn on Plex” this just turn on the automation and does not trigger. Any help would be appreciated.
You need a way for Alexa to trigger the automation. What Alexa sees is the enable/disable option for the automation. You need a way for Alexa to trigger it. Something using a script maybe?
I’m not 100% on this and haven’t tested it myself but I’d be starting with something like this. Make sure the script is exposed to Alexa and then using a Routine, have Alexa use this script rather than the switch for the automation.
I use a virtual or dummy light bulb exposed through emulated hue and Alexa routines trigger them based the brightness of the light. ill edit in a minute and add the post that references it once I find it… (or just search for Alexa virtual or Alexa dummy)
Just make sure your Alexa routine only sets brightness level and not “on” and make sure your automation also turns off the bulb. I use a last used Alexa sensor (an older method not the new one) and have all sorts of tts routines and responses for stuff…and it only responds on the Alexa I spoke to… pretty fun stuff. Now that I have a new tv my kids can ask Alexa to turn on the PlayStation and it switches inputs on the tv and responds to them whether she turned it on, it was already on etc.
Thanks for the replies. Both great Ideas, and I think I will try cjsimmons idea first.
I did manage to create a series of automations, three in total.
1, to have Alexa turn it to an on state 2nd, to be triggered by the on state, and the 3rd, sees the on state of the first and turns it back to off. It works, but these ideas will simplify. Especially as I add more apps.
Hope it works for you. I ended up going the route I did because with the routines I can say whatever I want/ask whatever I want and not be restricted to “Alexa, turn on…” first.
Invalid config for [switch.template]: required key not provided @ data[‘switches’]. Got None. (See ?, line ?). Please check the docs at Template Switch - Home Assistant
But HA not happy
nvalid config for [switch.template]: invalid slug Hulu (try hulu) for dictionary value @ data[‘switches’]. Got OrderedDict([(‘Hulu’, OrderedDict([(‘turn_on’, OrderedDict([(‘service’, ‘script.turn_on’), (‘entity_id’, ‘script.1552236476626’)])), (‘turn_off’, None), (‘value_template’, False)]))]). (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.template/