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
#Send Data to Blueprint Script
1 messages · Page 1 of 1 (latest)
Post the blueprint.
Please use a code share site to share code or logs, for example:
- https://dpaste.org/ (select YAML for the language, and consider picking a longer expiry)
- http://pastie.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
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.
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
Looks fine to me 🤷
see my edit. i cant use "actions" for that Blueprint Script, But for a standalone Script.
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.
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
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"?
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
aight ill try to find something. tyvm