Different tap_actions for different clients?

Hi!

Is there a way to find out from which device I am accessing the UI? I use two different android tablets for accessing the UI which both use the Fully Kiosk Browser which is capable of starting android apps via API call like the Spotify client. But I need to know on which entity I have to start the app.

So my Idea is to pass some kind of ID like the local IP address of client to a script which starts the app to the corresponding tablet. May I just used the wrong search terms or went in the wrong direction while thinking about possible solutions, but I couldn’t find anything yet what could help me doing this.

I would like to avoid to maintain two different dashboards which just differ in the hardcoded device entity of the Fully Kiosk client.

Kind regards,

Christian

I think there is an add-on called browser mod that can do something like that

1 Like

Yessir! That did the trick. Thank you! So this is my solution for now:

This script is being called with the deviceID:

alias: fullykiosk_startSpotify
sequence:
  - service: fullykiosk.start_application
    data:
      entity_id: |
        {% if deviceID == '6e7a1450-9ba1ed74' %}
          media_player.tablet_hallway
        {% else %}
          media_player.tablet_office
        {% endif %}
      application: com.spotify.music
  - delay:
      minutes: 3
  - service: fullykiosk.to_foreground
    data:
      entity_id: |
        {% if deviceID == '6e7a1450-9ba1ed74' %}
          media_player.tablet_hallway
        {% else %}
          media_player.tablet_office
        {% endif %}
mode: single

and the corresponding button:

type: custom:button-card
icon: mdi:speaker-wireless
tap_action:
  action: fire-dom-event
  browser_mod:
    command: call-service
    service: script.fullykiosk_startSpotify
    service_data:
      deviceID: this

Using Fully Kiosk Browser on Android and browser_mod of @thomasloven for those who are wondering what we are talking about.

It’s a pity that there is no such thing for iOS yet.