Webostv and Alexa

Hi.
I am using HA to control my LG TV and it’s working well. From HA I can power it off/on, select Live TV, Netflix etc
I’m using Home Assistant Cloud for integration with Alexa and that is working well.
The problem I have is that I can tell Alexa to turn on/off the TV but I would like to be able to do something like ‘Alexa, watch Netflix’ or ‘Alexa, watch YouTube’.
Is this possible?

I think I’ve answered this myself.

I’m going to use a scene.

Hi,

I am also trying to do the same thing (and failing miserably) so wondered if you have had any joy at all?

Yes, to some extent. I can get Alexa to change the source e.g. Netflix, Live TV etc but not to do two actions - e.g. turn on the TV and then select the source.

This is my scenes.yaml

# TV source
- name: Netflix
  entities:
   media_player.lg_webos_smart_tv:
    source: Netflix
- name: Live TV
  entities:
   media_player.lg_webos_smart_tv:
    source: Live TV
- name: YouTube
  entities:
   media_player.lg_webos_smart_tv:
    source: YouTube
- name: Plex
  entities:
   media_player.lg_webos_smart_tv:
    source: Plex
- name: Apple TV
  entities:
   media_player.lg_webos_smart_tv:
    source: Apple TV

I’m using Home Assistant Cloud for my skill with Alexa and have setup different routines in the Alexa app for Netflix etc. With routines I had to setup Apple TV and Live TV as ‘Apple’ and ‘Television’ as Alexa had issues understanding me say Apple TV or Live TV - must be my accent!

So, my commands to Alexa are:

Alexa, turn on the tv
Alexa, Netflix
Alexa, turn off the tv

I’m new to all of this so there may be a better way.

Forgot to add the configuration.yaml entry.

# Cloud
cloud:
 alexa:
  filter:
   include_domains:
    - scene

Thank you, works like a charm! all I wanted to do was turn on/off the tv and select the sources via voice command

Can you explain how to turn on the LG TV ? I can’t turn off but not turn on

Here’s my configuration.yaml for the TV.

        # LG TV
        wake_on_lan: # enables `wake_on_lan` domain

        media_player:
          - platform: webostv
            host: 192.168.0.140

            #other settings
            turn_on_action:
              service: wake_on_lan.send_magic_packet
              data:
                mac: "14-C9-13-0F-31-AA"

I think your problem may be that you do not have ‘Mobile TV On’ turned on. This is under Settings->General on your LG TV.

Thank you @irose I was able to do that and also I was able to do something like “Alexa, open Netflix” even if the TV is off, it was done by using Tasker and AutoVoice.

So I just created a task in Tasker That will check if the tv is on and open the Netflix, but if the tv is off it’s will turn the tv on then wait until the tv status turns to on and start Netflix