#Can a script blueprint be created that just installs the script as is?

1 messages · Page 1 of 1 (latest)

limpid fossil
#

I have a couple scripts for my project that I would like to make easy to install rather than instruct the user how to copy/paste the code into the editor or copy the file into the proper directory. Here's an example:

alias: Play Sound on Media Player
description: Play a sound file on a specific media player entity
fields:
  media_player:
    description: The media player entity to play the sound on
    example: media_player.living_room_speaker
    required: true
    selector:
      entity:
        domain: media_player
  sound_file:
    description: The URL or file path of the sound to play
    example: /local/sounds/alert.mp3
    required: true
    selector:
      text:
        multiline: false
sequence:
  - data:
      entity_id: "{{ media_player }}"
      media_content_id: "{{ sound_file }}"
      media_content_type: music
    action: media_player.play_media
  - action: media_player.clear_playlist
    target:
      entity_id: "{{ media_player }}"
    enabled: true
mode: single
icon: mdi:file-music-outline

I want to keep this script exactly the way it is with the templated variables. Is this possible?

dark creek
#

I think that's exactly what you'd get if you just converted that to a blueprint with no inputs?

#

They'll still have to save/name it though I guess

limpid fossil
#

Thanks. I'll give that a try and report back in case someone stumbles on this thread with the same desire.