#Problem turning Script into Blueprint
1 messages · Page 1 of 1 (latest)
Script blueprint or automation blueprint, 2 different things. I haven't looked at your code, will do that niow...
Script Blueprint, but I already tried to set blueprint domain to "script" but this doesn't work
It does work as as script
But my script has a variables sections.. I removed it and replaced the variables with the inputs
So you have automation as the blueprint type, that needs to say script. then try it.
(domain)
The next thing I see is !input statements inside templates, that doesn't work, have to make variables for those.
Invalid blueprint: Found incorrect blueprint type script, expected automation
blueprint:
name: Raumautomatisierung (Licht)
#description:
domain: script
You have to also move it to the right folder
ah, my bad
Corrected the blueprint domain and saved it to scripts folder..
Okay, will try to fix them
I updated the script, now getting Error:
Message malformed: not a valid value for dictionary value @ data['sequence'][0]['choose'][0]['sequence'][0]['choose'][0]['sequence'][0]['target']['entity_id']
Missed one likely. that tells you where it is.
Is there a value in the input that is an entity?
If you're using a target selector, I think you just want this:
- target:
- entity_id: !input light_on_entity
+ target: !input light_on_entity
The input already has a dict with entity_id in it, so your code is erroneously doubling that up:
target:
entity_id:
entity_id: light.erdgeschoss_bad_lichter
Great, could save it 🙂
That one I missed... But you are correct @civic ginkgo
These are in a bunch of places...
If you use a target selector, you get a dict as the value.
https://www.home-assistant.io/docs/blueprint/selectors/#target-selector
It's not a simple string with what you selected
Also consider that target selectors can have multiple entities, devices, or area
How is your script going to handle if someone selects an area there instead of an entity?
You may prefer to just use a simple entity selector instead
Like this?
light_check_entity:
entity:
domain:
- light
You can read the above documentation for examples.
I already read the section about entity selectors but I cannot get it to work: