Open app on Android phone

I need your suggestion now for something else, but I do something wrong…could you help me ?

I have this automatisation which works fine :

alias: Speel radio bij wijzigen radiostation of luidspreker
description: ''
trigger:
  - platform: state
    entity_id: input_select.radio_station
  - platform: state
    entity_id: input_select.speaker
condition: []
action:
  - service: script.media_radio_play
    data:
      station: '{{ states(''input_select.radio_station'') }}'
      player: '{{ states(''input_select.speaker'') }}'
mode: single

Now I want this activated with a button, but this doesn’t work (already trying a lot of combinations of quotes, but…) :angry:

type: button
tap_action:
  action: call-service
  service: script.media_radio_play
  service_data:
    station: |
      {% states('input_select.radio_station') %}
    player: |
      {% states('input_select.speaker') %}
  target: {}
name: PLay music !

Solved !

You can’t template in lovelace. You have to make a script and call the script.

Any idea how to open the Spotify app ?

type: button
tap_action:
  action: call-service
  service: notify.mobile_app_lm_g710
  service_data:
    message: command_activity
    title: **http://www.spotify.com/artist**
    data:
      channel: com.spotify.music
      tag: android.intent.action.VIEW
  target: {}
name: Call Spotify

check the link I posted above, there is a section for spotify

Oh sorry, I didn’t see a link. Thanks !

And the last one : I want to call my PHC app (that’s my home automatisation system)…

Any idea of the title here ?

type: button
tap_action:
  action: call-service
  service: notify.mobile_app_lm_g710
  service_data:
    message: command_activity
    title: http://www.honeywell.com
    data:
      channel: com.honeywell.EESCommercialEurope.phc
      tag: android.intent.action.VIEW
  target: {}
name: Peha
icon: mdi:electric-switch

Apologize for not reading the start of the thread :man_facepalming: for opening an app on the frontend you can use webview links instead of sending a notification command

Super, it works already that way :grinning:

Can this also been used in a button… ?

yes it can, basically this feature uses URL overriding so you can set up a button card using url_path and then follow the docs and it should work.

Hi
can you help - i want to open this app https://play.google.com/store/apps/details?id=gluehome.picapau&hl=en_US&gl=US

on my phone

i can open netflix with the examble on the help page but i can’t figure out how to onen the Glue app.

install this app, it show you the intents you can use:

4 posts above yours has a link with examples to follow

thanks , but i cant find “GLUE” app in the Activity Launcher

if all you want to do is open an app using a link in the Frontend just use the package name for the app with webview links

the package name can be found in the URL you posted

gluehome.picapau

I want to open an app on my phone - by using an automation in HA

service: notify.mobile_app_rhmobil
data:
  message: command_activity
  title: call glue
  data:
    channel: com.apps.gluehome.picapau
    tag: android.intent.action.VIEW

try

  message: command_activity
  data:
    tag: "android.intent.action.MAIN"
    channel: "gluehome.picapau"

no it dont open app

my phone (samsung s10e android 12) says : could not send activity intent

service: notify.mobile_app_rhmobil
data:
  message: command_activity
  data:
    channel: "android.intent.action.MAIN"
    tag: "gluehome.picapau"

You mixed up the data portion

thanks but same result

service: notify.mobile_app_rhmobil
data:
  message: "command_activity
  data:
    tag: "android.intent.action.MAIN"
    channel: "gluehome.picapau"

hahha thats what i get for blindly copying something :stuck_out_tongue:

@ha_user22323 you need to get an activity to launch to for that app, activity launcher should indeed find an activity to target so not sure why the app doesnt show up there. You may need to reach out to the developer of the application if you continue to have difficulties. They can probably tell you how to even open the app directly to your lock or whatever you want. Alternatively you can install an app like Logcat Reader to look at the intents. This is an advanced feature so it will require you to investigate things.

ok thanks for your time, i thought it was easy to open the like i could do with the Netflex app. :slight_smile: