Add service selector for blueprints

Add a service selector for blueprints for automations where the desired service might change from case to case.

For example, I have a blueprint which is for zigbee buttons. I take in the “Press Service” as just text right now

    press_service:
      name: Press Service
      description: Service to call for example script.turn_on, light.turn_off, media_player.media_pause. There isn't a selector for service so this is just plain text.
      selector:
        text: {}

Then that gets used in the automation reacting to the button press

    sequence:
    - service: !input 'press_service'
      target: !input 'press_entity'

It would be nice if it would be a selector so when creating an automation from the blueprint you can be sure you’ve entered the service correctly.

Use the action selector https://www.home-assistant.io/docs/blueprint/selectors/#action-selector

1 Like

Awesome! Didn’t read the action selector documentation as the name seemed unrelated. Thanks!!

I’m trying to make a script where users can select a pre- and post-run action via an action selector.

How did you get the selected action to execute in your script?

Edit: Found it, sort of: Use input (fields) in script as sequences - #9 by nwithan8