#Send Data to Blueprint Script

1 messages · Page 1 of 1 (latest)

devout badger
#

Hello,
i created a script where i can send data like node id etc.. but when i transformed it into a blueprint it doesnt accept any data anymore not even in the UI, the fields are missing. what am i doing wrong? How can i fix it? I want to create the script in blueprint so people can use it... sadCat

dawn saffron
#

Post the blueprint.

bitter bisonBOT
#

Please use a code share site to share code or logs, for example:

Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.

devout badger
# dawn saffron Post the blueprint.

https://dpaste.org/GmSzL

i usually could use something like this to get the "key" i wish. but the actions arent working anymore.

alias: Test Generic JSON Getter Blueprint
description: >-
  Manually triggers an instance of the Generic JSON Getter blueprint
  to verify dynamic data passing and response handling.
trigger: null
action:
  - action: script.YOUR_GENERIC_JSON_GETTER_INSTANCE_ID
    data:
      key_input: "test_key_123"
      default_value_input: "GenericFallbackValue"
      helper_entity_input: "input_text.generic_json_data"
      debug_mode: true
    response_variable: generic_getter_output

  - service: persistent_notification.create
    data:
      title: "Generic Getter Blueprint Test Result"
      notification_id: "generic_getter_blueprint_test_result"
      message: >-
        Called generic getter for Key: {{ action[0].data.key_input }}
        Raw response: {{ generic_getter_output }}
        Value key: {{ generic_getter_output.value if generic_getter_output is mapping and 'value' in generic_getter_output else 'Response not a dict or value key missing' }}
mode: single
dawn saffron
#

Looks fine to me 🤷

devout badger
dawn saffron
#

You're expecting fields here?

devout badger
# dawn saffron You're expecting fields here?

YES! xD my standalone, literally the same just not a blueprint, has them. I was testing them till they work and then wrapped them into a blueprint for the community. now its ded.

#

the idea is, ill have a sender and a getter. i wanted to outsource the stuff so an automation can call the setter. the setter calls the getter, does its job and the automation keeps processing.

now with the blueprints that doesnt work anymore. but i would love to have the input fields of the blueprint so people can easy import them.

dawn saffron
#

I think you're confusing the difference between fields and blueprint inputs

#

if you want your blueprint to have dynamic fields, you need to define them as part of the script

devout badger
#

https://dpaste.org/6ptbK can be used in action with data to send via automation.

action:
  - action: script.YOUR_GENERIC_JSON_GETTER_INSTANCE_ID
    data:
      key_input: "test_key_123"
      default_value_input: "GenericFallbackValue"
      helper_entity_input: "input_text.generic_json_data"
      debug_mode: true
    response_variable: generic_getter_output

How do i do that for the blueprint? what do i need to add that it accepts "actions data"?

dawn saffron
#

don't have the time to go lookup the exact syntax ATM, but I assume there should be a fields: key somewhere in the blueprint

#

just like a script

devout badger