#Dynamic URL Opening or even Textsend for LG webOS (example C1-C4 OLEDs

1 messages · Page 1 of 1 (latest)

gaunt dew
#

Hi i want to use a helper field to open a dynamic adress (nobody wants to enter urls via tv remote..)

type: vertical-stack
cards:

  • type: entities
    entities:
    • entity: input_text.smart_tv_url
      name: TV Browser URL Eingabe
      tap_action:
      action: call-service
      service: webostv.command
      service_data:
      entity_id: media_player.lg_webos_tv_oled48c17lb
      command: system.launcher/open
      payload:
      id: com.webos.app.browser
      params:
      target: "{{ states('input_text.smart_tv_url') }}"
  • type: button
    name: GO
    tap_action:
    action: call-service
    service: webostv.command
    service_data:
    entity_id: media_player.lg_webos_tv_oled48c17lb
    command: system.launcher/open
    payload:
    id: com.webos.app.browser
    params:
    target: "{{ states('input_text.smart_tv_url') }}"

Sadly it does not interpret the helper and opens the browser with {{ states('input_text.smart_tv_url') }} i tried multiple idees nothing seem to take the helper.. any idees?
I would love it even more when i could send keyboard text via the phone with a buttonpress that would bve even more versatile but one step after the next..

slate trail
#

@gaunt dew you can only template in the backend. You should make a script that performs the action and call the script from the frontend.

gaunt dew
#

Thanks will do that!

gaunt dew
#

did it and worked well in the end it was 3 easy steps

  1. create the script
    2 create a helper text
  2. create the dashboard

here for ppl who want it too do it in yaml not in ui create a fake script and than open editor if needet
Insert the following code at the end of the scripts.yaml file:

ofc use your own entity ID...

entity_id: media_player.lg_webos_tv_oled48c17lb command: system.launcher/open payload: id: com.webos.app.browser params: target: "{{ states('input_text.smart_tv_url') }}"

create the helper by adding the following to your configuration.yaml

input_text: smart_tv_url: name: TV Browser URL Eingabe initial: "https://example.com"

last dashboard integration

`type: vertical-stack
cards:

  • type: entities
    title: 📺 TV Steuerung
    entities:

    • entity: input_text.smart_tv_url
      name: TV Browser URL Eingabe
      icon: mdi:web
      style: |
      ha-card {
      background-color: var(--card-background-color);
      border-radius: 12px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
      }
  • type: 'custom:button-card'
    name: 🚀 GO (Open URL)
    icon: mdi:television-play
    tap_action:
    action: call-service
    service: script.open_tv_browser
    styles:
    card:
    - background-color: '#4CAF50'
    - border-radius: 12px
    - box-shadow: 0 2px 4px rgba(0,0,0,0.2)
    - height: 60px
    name:
    - color: white
    - font-size: 18px
    icon:
    - color: white`

note that entity id is fixed in the script