LG Netcast

The LG Netcast integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to control a LG Smart TV running NetCast 3.0 (LG Smart TV models released in 2012) and NetCast 4.0 (LG Smart TV models released in 2013). For the new LG WebOS TV’s use the webostv platform.

Configuration

To add the LG Netcast device to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select LG Netcast.

  • Follow the instructions on screen to complete the setup.

Turn on action

Home Assistant can turn on an LG Netcast TV if you specify an action provided by an integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] like HDMI-CEC or WakeOnLan.

  1. To create an automation, go to Settings > Devices & services and open the device page.
  2. Under Automations, select the + icon to create an automation with that device.
  3. In the dialog, select the Device is requested to turn on automation.

Automations can also be created using an automation action:

The example below shows how you can use the turn_on_action with the wake_on_lan integration.

# Example configuration.yaml entry
wake_on_lan: # enables `wake_on_lan` integration

# Enables the `lg_netcast` media player
automation:
  - alias: "Turn On Living Room TV with WakeOnLan"
    triggers:
      - trigger: lg_netcast.turn_on
        entity_id: media_player.lg_netcast_smart_tv
    actions:
      - action: wake_on_lan.send_magic_packet
        data:
          mac: AA-BB-CC-DD-EE-FF
          broadcast_address: 11.22.33.44

Any other actions to power on the device can be configured.

Change channel through play_media action

The play_media action can be used in a script to switch to the specified TV channel. It selects the major channel number according to the media_content_id parameter:

# Example action entry in script to switch to channel number 15
action: media_player.play_media
target:
  entity_id: media_player.lg_tv
data:
  media_content_id: 15
  media_content_type: channel

Remote

The LG Netcast remote platform creates a Remote entity for each configured TV. This entity allows you to send remote control commands. To power on the TV, use the turn on automation trigger described above.

Action: Send command

The remote.send_command action sends one or more remote commands to the TV.

  • Data attribute: command

    • Description: Command, or list of commands, to send. See the list below.
    • Optional: No
  • Data attribute: num_repeats

    • Description: Number of times to repeat the command sequence. The default is 1.
    • Optional: Yes
  • Data attribute: delay_secs

    • Description: Delay in seconds between commands and repeats.
    • Optional: Yes
Full key code list
  • APPS
  • ASPECT_RATIO
  • AUDIO_DESCRIPTION
  • AV_MODE
  • BACK
  • BLUE
  • CHANNEL_DOWN
  • CHANNEL_UP
  • DASH
  • DOWN
  • ENERGY_SAVING
  • EPG
  • EXIT
  • EXTERNAL_INPUT
  • FAST_FORWARD
  • FAVORITE_CHANNEL
  • GREEN
  • HOME_MENU
  • LEFT
  • LIVE_TV
  • LR_3D
  • MARK
  • MUTE_TOGGLE
  • NUMBER_0
  • NUMBER_1
  • NUMBER_2
  • NUMBER_3
  • NUMBER_4
  • NUMBER_5
  • NUMBER_6
  • NUMBER_7
  • NUMBER_8
  • NUMBER_9
  • OK
  • PAUSE
  • PIP_CHANNEL_DOWN
  • PIP_CHANNEL_UP
  • PIP_SECONDARY_VIDEO
  • PLAY
  • POWER
  • PREVIOUS_CHANNEL
  • PROGRAM_INFORMATION
  • PROGRAM_LIST
  • QUICK_MENU
  • RECORD
  • RECORDING_LIST
  • RED
  • REPEAT
  • RESERVATION_PROGRAM_LIST
  • REWIND
  • RIGHT
  • SHOW_SUBTITLE
  • SIMPLINK
  • SKIP_BACKWARD
  • SKIP_FORWARD
  • STOP
  • SWITCH_VIDEO
  • TELE_TEXT
  • TEXT_OPTION
  • UP
  • VIDEO_3D
  • VOLUME_DOWN
  • VOLUME_UP
  • YELLOW

Examples

Send a single command:

action: remote.send_command
target:
  entity_id: remote.lg_tv
data:
  command: HOME_MENU

Send repeated commands with a delay:

action: remote.send_command
target:
  entity_id: remote.lg_tv
data:
  command:
    - VOLUME_UP
  num_repeats: 5
  delay_secs: 0.3