Scripts vs devices vs entities in Alexa. Is there a best practice guide?

Hey all,

I recently started the automation process of my house. I basically have HAOS running on a RP4, an eco show 8, a few sonoff light switches, a broadlink rm4 pro and some smart appliances.
Even though it’s all very basic, I was able to integrate basically everything I have with home assistant (witch was quite amazing considering I never heard of home assistant until last month).
The only thing I’m strugling a bit is about how home assistant integrates with alexa devices. I understand that you can expose entities, devices and scripts to alexa and it all works well. But so far I got everything to work using scripts for basically everything that is not a light switch. For that I had to configure tons of routines with tons of commands.
For example, I have a LG webOS TV set up in home assistant. In home assitant I can control all of the TV functions except for turning it on (it doesn’t support wake on lan), to turn it on I use the broadlink device.
And here all my “problems” begin. If I want to pause the TV using alexa, I have to create a script with a play/pause function and then a routine, in Alexa, but some times when I give Alexa a routine command it responds with the following message “there’s no device named television” as my routine trigger is “alexa, pause the televison/tv”. Some times the commands, like “alexa, turn the television volume up” triggers alexa to turn it’s own volume up, ignoring the routine I created.
In the other hand, if I expose the whole TV to Alexa I can’t use play/pause, set the volume or anything except than turning it off. Don’t know why it’s like that. Even using LG skill in alexa the options are quite limited.

So what I’d like to better understand is:

  • What is the best way to integrate home assistant devices with alexa? Scripts (and routines), devices, the entities or a mix of all three?
  • This one is a shot in the dark, since I’m very new at home assistant, but is there a way to create “virtual devices” in home assistant? Since it seems to me that alexa best integrates with a device rather than scripts. If was possible to create a virtual device called TV that we could mix with entities that are not part of the tv, like the broadlink to control it. I could have a smarter television that works better with alexa.
  • Am I understanding the whole home assistant / alexa / smart home thing completely wrong and need to start from scratch?

PS: Is quite a challange for me to expose the problem in english, since it’s not my first language. If something is not well described, I can try to explain it better.


watching as I have the same question but with harmony

I’m also interested in this.

I am debating buying the broadlink RM4, so I can trigger Alexa actions (e.g. execute one of my existing Alexa routines) when I press a button on my TV remote. Based on what you described, I understand that it is possible but very clunky.

The RM4 has served me well allowing me to both control devices from Alexa as well as HA. This does not answer the questions on the thread starter though: what’s the best way to integrate things.