Open website via button

Hi everyone,

I’m actually looking for a way to open a website when I press a button. I’ve been searching for a while now, but I’m not really finding anything. Can anyone point me in the right direction? Thanks in advance.

Actions - Home Assistant

Use the url action.

1 Like

Thanks for your response. Is it also possible that it’s triggered by an NFC tag?

tag_scanned is just an event type in a trigger. So, sure.

Thanks for your reply. Still, it’s not really working. To try, I simply try opening Google. I have the following configuration:

configuratie.yaml

rest_command:
  google_command:
    url: 'https://www.google.com/?hl=nl'

automatisering

description: ""
mode: single
triggers:
  - trigger: state
    entity_id:
      - input_boolean.testknop_1
conditions: []
actions:
  - action: rest_command.google_command
    metadata: {}
    data: {}

But I can’t really get it to work

This works and was your original question:

type: glance
entities:
  - entity: sun.sun
    tap_action:
      action: url
      url_path: https://google.com

Using the glance card as a button and a tap_action.

I don’t see where it works as an action in an automation.

Your last attempt is how you would do it to use a URL to do something. Send a command to a system that accepts commands from URLs. Not open a website.

But how do I do that with an NFC tag?

I am not seeing an action that can ‘just do it’ like that.

You can send a message to the device with a click action that opens the URL.

What I actually mean is, is it possible to scan an NFC tag and then open a specific website on my PC?

I completely understand. And I am telling you from what I have investigated answering your often changing question … the answer is … not directly that I can see. There may be work arounds.

I am tired. Maybe someone else will come along and help.

ok, thank you :+1: :+1:

Have a look at hass-agent.io
It can send commands to your pc to do all kinds of stuff, including open a webpage. Then just set up the automation in HA with the NFC tag as the trigger.