Behavior when tapped with Navigate and set value

Hi,

How could I access a dashboard with a single keystroke on an entity card and then automatically set a value for an entity?
I have Browser Mod installed but when I use the “navigate” function - all browser will navigate to the specific dashboard.

Any ideas?

Best regards.
Michael

For Browser Mod you can target specific Browser’s or if you only want the service to run locally you make it a Browse call via fire-Dom-event. You can then also use browser_mod.sequence where you can also use regular actions. You would want to make your navigate the last action.

How can I find out which Browser will be served? When I know which Browser my problem is solved.

The Browser Id controls which browser is used. When omitted with a Server call (regular action from button, automation or script, all browsers are targeted. When left out in a Browser call with fire-dom-event, the local Browse is targeted. Check out the docs for examples.

A more advanced topic is when you want to send the local browser id to a backend script. In this case you use a Browser call, then in the browser mod service you can use the special Browser Id THIS

If you can share the logic of what you are trying to do perhaps I can give you some pointers if you need.

I would like that 2 things happen when I push an entity card.
First: go to a specific dashboard
Second: Set an entity true

In the moment i use a script that makes following:

  1. action: browser mod navigate to dashboard
  2. set entity

Do you need that order? Once the navigate is done you can do any more actions as its a new page.

The order is not relevant.
Problem is that every browser makes the navigate action.

This should get you going…

type: button
name: Browser Call Test
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.sequence
    data:
      sequence:
        - service: light.toggle
          target:
            entity_id: light.bed_light
        - service: browser_mod.navigate
          data:
            path: /lovelace
1 Like

Perfect! Thank you very much!

You can now set as solution for the thread. Thank you.