Action: url via call-service

Is there a way to replicate this action/behavior:

tap_action:
  action: url
  url_path: https:www.google.com

With a call-service?

I have experimented with shell_command / rest_command unsuccessfully.
They don’t return errors but can’t manage to open the default browser on the device where the command is issued.

Thanks!

Tap action is a frontend related command so it can freely redirect you to a website.

Call service can be used in any context (user interaction, timed trigger as automation or scripts) so naturally it doesn’t have this functionality.

You can install browser mod and enable it for interested browsers and send these commands to th via call service

Thanks for the feedback,

Had already tested browser mod, it is enabled on the target devices.
Here’s what I’ve tried:

alias: Url
sequence:
  - service: browser_mod.navigate
    data:
      path: http://www.google.com
    target:
      device_id: this
mode: single

But doesn’t work. I’ve tried both a specific device_id and “this”.
Syntax error?

FYI my use case is here:

Thx

Assuming this is a script, you should use uppercase THIS. Moreover, if this is triggered by an automation or some other script without any browser, this might fail as there is no browser context on these use cases.

browser_id: THIS

read here carefully: https://github.com/thomasloven/hass-browser_mod/blob/89bec37383bc307bec4b302af19d32120e684641/documentation/services.md#a-note-about-targets

Sorry, didn’t see your reply earlier.

I did test with “THIS” expecting the browser to open on all registered browsers but nothing happens at all…
unless you have other ideas I guess I’ll have to wait for the developer on this one…

alias: URL call
sequence:
  - service: browser_mod.navigate
    data:
      path: http://www.google.com
    target:
      device_id: THIS
mode: single

I am a bit confused, let’s go back to initial ask, you want to implement a service to open a browser page with a specific address on a registered device, right?

Correct. I want to open a browser/url via a service-call

This works to navigate the dashboards:

alias: URL call
sequence:
  - service: browser_mod.navigate
    data:
      path: /dashboard-tablets/2e
      browser_id: CELLTEST
mode: single

This doesn’t (dashboard + THIS)

alias: URL call
sequence:
  - service: browser_mod.navigate
    data:
      path: /dashboard-tablets/2e
      browser_id: THIS
mode: single

this doesn’t (External URL + working browser ID)

alias: URL call
sequence:
  - service: browser_mod.navigate
    data:
      path: http://www.google.com
      browser_id: CELLTEST
mode: single

also tried this unsuccessfully

alias: URL call
sequence:
  - service: browser.browse_url
    data:
      url: http://www.google.com
mode: single