I do this:
- service: androidtv.adb_command
data:
entity_id: media_player.living_room_shield
command: ps -ef | grep -v grep | grep pipup || am start nl.rogro82.pipup/.MainActivity
- service: rest_command.pipup_video
data:
title: Garage {{ states('cover.xxxx') }}
message: ''
titleColor: red
position: 2
width: 420
height: 280
ip: x.x.x.x
url: '{{ lasturl }}'
Simply checks and starts it before I push the notification.