#blueprints-archived

1 messages · Page 10 of 1

tough zephyr
#

@plucky bison

#

Right now I'm tethered to a phone and running on borrowed data.

plucky bison
#

im sorry. I was not trying to have you write it for me. i am just missing something in my understanding. The code is https://dpaste.org/RN2uD
Really simple i admit. i will look at the pinned ones and see if I can figure out the pieces.
I understand about the phone and data, i am sorry to lean too heavy on you.
-That is a good idea, to write the automation first and then twist it into a blueprint. I will try that first.

plucky bison
#

@tough zephyr I am trying to make an automation that does this, but i can not get the dropdowns to put in variables that will be passed through. I tried to copy what you had in the pinned and in the samples. I guess i am missing something. Any thoughts?
The problem is getting it to at least ask for input for the 4 variables, or let me use the dropdowns to set the variables.
-it won't let me save either: https://dpaste.org/y9wEh
Any ideas would be appreciated

tough zephyr
# plucky bison <@518814283170054165> I am trying to make an automation that does this, but i ca...

!inputs come from the top of the blueprint, and are not 'really' executed code. They are for user inputs. When you pull data out of a rest API you are needing templates and variables and all the stuff that also works in regular automations. !inputs cannot come from an API that I know of.
Get this working as an automation. Where there would be multiple choice IE !inputs, put actual data there that would work as one of the multiple choice responses.
Get your idea working in a limited one example way, then start with making it a blueprint.

plucky bison
tough zephyr
#

Get it running manual with one of the set of valid responses. Start small and build on it. I have a fair amount of blueprint experience but I start with either a working automation and adapt it, or I adapt a similar blueprint where the logic is already working.

You are learning new things in automations and trying to change them into a blueprint , and you don't know what your errors are from. One thing at a time...

#

One small thing at a time...

plucky bison
candid radish
#

I'm trying to pass a script as an input variable in an automation blueprint and call that in an action sequence
but i'm getting an error - is this even possible?
scene_default_script:
selector:
entity:
domain: script
this is how i've defined my input variable - and the blueprint allows me to select a script
and i'm calling the script in my actions
- service: !input scene_default_script
data: {}
when i try to create an automation using this blueprint i get this error in my logs
2022-06-26 11:29:45 ERROR (MainThread) [homeassistant.components.automation] Blueprint Room Scene Switcher using Ikea Dimmer generated invalid automation with inputs OrderedDict([('dimmer_zigbeename', 'Guest Scene Switcher'), ('scene_selector_helper', 'input_select.media_scene_selector'), ('target_airconditioner', 'climate.media_room_ac'), ('scene_off_script', 'script.mediaroom_off'), ('scene_relax_script', 'script.mediaroom_relax'), ('scene_default_script', 'script.mediaroom_relax'), ('scene_Bright_script', 'script.mediaroom_bright'), ('scene_roompoweroff_script', 'script.mediaroom_off'), ('scene_bright_script', 'script.mediaroom_bright')]): Service scene_relax_script does not match format <domain>.<name> for dictionary value @ data['action'][3]['choose'][1]['sequence'][0]['service']. Got None

#

what am i doing wrong here?

candid radish
#

Simplifying my question - I'd like to choose a "script" as an input.....and call the chosen script in my actions sequence

tough zephyr
#

It's not liking the format of the name or the input or something. Break it down to see where the problem is. First instead of calling service: !input, put the actual script name in there and see if it works. Then you know if the !input syntax is a problem or something else.

#

@candid radish

woeful coral
#

I successfully got this blueprint to work to control and dim my light bulb with an Ikea on/off button:

#

But for some reason I've only got 2 of my 3 switches showing up in the blueprint. I've checked the 1 switch that isn't showing up vs the other switches and the manufacturer and the model of the switch match, which is what the blueprint appears to check against

#

any ideas why the 3rd switch isn't showing when configuring an automation with the blueprint? The only thing I don't know how to check is the "remote" domain?

tough zephyr
woeful coral
#

I dont know if a trace is gonna help. I can’t get past the automation creation step. This is because the switch i want to create the automation for isnt showing up as an option in the blueprint/automation gui

dapper hamlet
#

Does anyone knows good blueprints for energy management with solar energy? e.g. I want to automatically make my car charge if the power output of by pv is over 2kW for 15 mins (and stop if under) and so on...

Make my washing machine / dryer start automatically, make my nas do backups and so on...

maiden solstice
#

As a part of a blueprint I have the following selector. It does not return any matches. I believe it should return all my lights and switches. Is this the right interpretation of the docs?

        target:
          entity:
            domain: ['light', 'switch']```
`domain: light` works; `domain: [light]` does not return anything
uneven bone
#

Does anyone know if there is a way to filter devices in a selector according to multiple models? i.e. I want a list of all models that match any of these model strings. For example, I would like to do this: ```
selector:
device:
integration: zwave_js
manufacturer: Inovelli
model:
- LZW31-SN
- LZW36
entity:
domain: light

But it doesn't like that. I can use either *one* of those models and it will work, but trying to do both like that gives me an error.
tough zephyr
plucky bison
#

i was sent here from #automations-archived by RobC:
i am seeing how to have an automation to look for an input. would this be correct monkey_entity: !input monkey_entity
or should it be
monkey_entity: !input {{monkey_entity}}
Also, is there a good on-line (or offline) yaml tester/validator so i can see if my code is correct or testing?
any ideas?

wide shoal
#

Hey, all, hopefull everyone is doing well so far today 🙂 so im back with new problems and questions 😄 Today im trying to optimize and simplify some of my basic GUI automations, is there a way to simplify theese two automations and to create one out of them ?

wide shoal
plucky bison
pale nest
#

Your indenting is all over the place

#

You've got

      monkey_entity: !input monkey_entity
``` when that's not what the doc show at all
#

I'll gloss over the fact that it has no trigger

#

Oh, and you've embedded the definition of the rest command in the automation action, which you can't do

#

You also (as discussed before) can't embed a secret in the middle of a string like that

potent summitBOT
#

YAML is the mark up language used by Home Assistant, consistent indenting (two spaces per level) is key. Here is a primer, and this explains multi-line templates. For validating YAML see YAML Lint.

pale nest
#

Oh, and you really really should read those links to understand a bit more about YAML and why indenting is key

plucky bison
#

ok, thank you. I would say trainwrek is being generous. lol.
i am reading through, and i thought I had replicated from the examples. How do you embed the rest command? the section below that is the meat. I remember about the URL part, i had kept it there as a placeholder.

plucky bison
pale nest
#

What on earth are you trying to do?

#

Blueprints are for automations, and that looks nothing like an automation

#

Also, "almost no errors" tells us nothing about the errors you are getting...

pale nest
#

If you're trying to change the values in the URL of the REST command (or the payload) then blueprints isn't the answer, that's entirely down to some templating with that #integrations-archived

plucky bison
pale nest
#

What?

#

No

plucky bison
# pale nest What?

when we talked before about building an integration, and I read the document you sent me to and it spoke of creating 3 files and such.
in js, py, and yaml. so i don't need to do those too?

pale nest
#

That was for something more complex than simply templating a URL

potent summitBOT
#

@plucky bison When using Discord's Reply feature it defaults to pinging the person you reply to, which can get frustrating for the target. Use Shift + click on the Reply option, or click @ ON to @ OFF to stop this - on the right side of the compose bar.

You have to change this every time (thank the Discord devs for that).

pale nest
plucky bison
pale nest
#

I'll let somebody else help you with #templates-archived and that integration - but you're really going to have to step away from your solution and describe the problem

potent summitBOT
#

The XY problem is asking about your attempted solution rather than your actual problem.

This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.

The problem occurs when people get stuck on what they believe is the solution and are unable to step back and explain the issue in full.

plucky bison
pale nest
#

What are you trying to do?

#

Because it looks like you're trying to template a REST command

#

That has nothing to do with blueprints, or automations

#

And the REST command supports templates

plucky bison
# pale nest Because it looks like you're trying to template a REST command

oh, ok. With the service Voice Monkey (app.voicemonkey.io) you go in and fill in fields to select a voice, text to speak, and several other fields that generates a url that ties back into the Alexa ecosystem to "say" the payload (which can include mp3's and pictures) out of an echo device. I am trying to bring the process into my HA and either have it speak it on demand like from the TTS, or at least generate the URL components. My ultimate goal is to select it as a 'something' (service, action, etc) when creating an automation, fill in the fields, and then the automation is complete. I hope that explains it a little better what my end state goal is. I was trying to do it without leaning too heavily on the community. But I know when I am over my head.
This would be useful to the community as well, as an integration. At least I think so.

pale nest
#

I'm done, others can help you

plucky bison
# pale nest And, yet again, the fucking notification ping...

im sorry, i thought it turned it off on all for you when i turned it off in the other chat. Do i have to turn it off for each reply? can i turn it off globally? I am sorry if I offended/annoyed you. I understand if you don't reply. thank you for the help so far.

pale nest
#

Try reading

plucky bison
wide shoal
#

So im trying my luck out here, I get the idea, I know what I need, but I just can do such an automation in my day 3/4 on YAML and doing it in the UI with like 5 automations isn’t the best way, so im trying my luck here looking for a template / blueprint to do the following, if the iRobot Script isn’t working, when a movement is detected and the Brightness is below 50 lux turn on the light, if there has been no movement for 20 sec, and the robot script isn’t running, turn off the light

iRobot script: irobot_with_automatic_lights
Light entity: switch.0x54ef4410003b3633
Movement detection entity: binary_sensor.motion_sensor_storage_room_occupancy
Brightness Entity: sensor.motion_sensor_storage_room_illuminance_lux

tough zephyr
# wide shoal So im trying my luck out here, I get the idea, I know what I need, but I just ca...

Blueprints are basically automations (or scripts) that can be called with variable inputs. You need to build an automation before you have a chance at getting a blueprint to work. I cover this in the pins... 📌
You can look thru the blueprint exchange to see of someone else has solved your problem,
What you describe sounds like a simple logic problem and an automation should be your answer.

plucky bison
#

@tough zephyr i have some functional automations, and i have read the pins. However, it seems that it needs more to make it into a blueprint. Also, is there a way to generate a text string from multiple inputs? Like input a name, location, and day for it to create something like "hello NAME and welcome to LOCATION on DAY"
Any thoughts would be great.

tough zephyr
plucky bison
# tough zephyr As mentioned to you *several* times lately that is a template, using HA's jinga2...

I have not heard of jinga2, my editor does not have a language for it (notepad ++). Where do i get an editor for that language?
I am confused, and maybe I am not expressing it right. I have seen many blueprints and automations in the community that build a text string from sensor data and/or inputs/variables for things like notifying that someone entered or departed a zone. Those are in YAML it seems. I have not quite been able to reverse engineer how they did it.
I am sorry if I am frustrating you, i am frustrated too because the concept seems so simple. I used to do it with old fashioned batch files all the time..

action:

  • device_id: !input notify_device
    domain: mobile_app
    type: notify
    message: {{ states ('door_name') }} has opened
    title: "Notice: "

door_name is entered by the user when using the blueprint. i could settle for the friendly name of the device/sensor.

spark junco
#

You have to quote your template. door_nameis a variable name so you should no quote it ({{states(door_name)}}. And finally, states(...) will return on or off (or something equivalent). If I understand correctly what you want to do, is should be someting like

    message: "{{ state_attr(door_name, 'friendly_name') }} has opened"
plucky bison
spark junco
#

To use an input in a template you should first create a variable

action:
  variables: 
    door_name: !input door_name
plucky bison
# spark junco To use an input in a template you should first create a variable ``` action: v...

ok, i put it in, then the code studio and it looks clean. No errors are thrown in the trace. However it does not send out the notification when i trigger it manually. I tested to make sure it was not my device, and it still gets alerts from some of the other automations.
The placing of the code gave me some errors, I adjusted the spacing and such to quiet it down. https://dpaste.org/vrv46
Does this look right?
Could it be simplified to just grab the friendly name from the door_entity since they are basically the same?
Sorry about this being a bigger mess.

jovial oriole
spark junco
plucky bison
# spark junco You put everything under variable 🙂 the notify part should be kept appart

Ok, sorry, i can see where that is an issue.
https://dpaste.org/BO0Ri
So now it sends the notification again, but no matter what I put in the door name field it sends the word "None" . There are no errors in the trace.
When i use it to create an automation it has "undefined" in the door name. It pops up when i backspace it out. and if I leave it the message still says "None has opened".
Is it maybe because the door_name isn't an entity? I really appreciate your help on this.

plucky bison
#

@spark junco Ok, i figured it out. looks like I just needed to grab the field from the sensor selected. https://dpaste.org/kOKax
i really appreciate all of your help. i could not have gotten here without you.
I wonder, do you know of a way to have it restrict the list of items to choose from to just the door sensors like when we select the notify device?

spark junco
#

You’re welcome. No I don’t know, I don’t think you can

plucky bison
tough zephyr
#

I wrote the condition for you. You are welcome.

jovial oriole
#

Ahhh ok so basically I should make my own copy of the blueprint, and add your mod too it. Is this correct?

tough zephyr
#

yup, or find the owner and have them add it to the master copy so everyone has it.
Do your own first to make sure I didn't fumble finger it, I cannot test it myself.

jovial oriole
#

Ok great thank you!

potent summitBOT
plucky bison
cerulean quail
#

unable to execute the autmation generated by a motion blueprints >

  • id: '1657155629961'
    alias: Living Motion
    description: ''
    use_blueprint:
    path: homeassistant/motion_light.yaml
    input:
    motion_entity: binary_sensor.living_motion
    light_target:
    entity_id: switch.bed_light_socket
pale nest
#

That's not a light, it's a switch

#

Try using switch_as_x to wrap it with a light entity, and use the new light entity

cerulean quail
#

is there any way to run the motion light blue print only at night ?

pale nest
#

Only by re-writing it

gray grotto
#

you could create an automation that activates the blueprint at certain hours

pale nest
#

Eh, that's not how blueprints work

#

You can't activate/deactivate them

gray grotto
#

a blueprint is used as an automation

#

so that automation would be deactivated until another automation is triggered and activates it

pale nest
#

Yes, but not the blueprint

cerulean quail
pale nest
#

Just write the automation from scratch, it's not hard 😉

gray grotto
#

there is other ways to do it other than writing an automation from scratch

pale nest
#

You could also just modify the blueprint

gray grotto
#

you have the blueprint automation setup

#

just create a second automation that is time dependent to activate/deactivate the blueprint automation

pale nest
tough zephyr
#

All-in-all, Blueprints in the exchange are a great place to get started seeing how stuff works, but relying just on the existing Blueprints (and BP makers) is not what you want. You often need to do something nitchy that only you need, so writing a small automation that turns on a light based on a motion sensor and time of day is a very easy task and a good place to start. The Automation UI almost builds it for you, When it's done, do yourself a favor and look at the YAML as well...

plucky bison
#

i have a question. i created a blueprint, and it works as expected to notify when a door is open. However, it does not seem to put the code in the automation it creates. it is almost like the automation is relying on the blueprint to be there and unchanged in the future.
I say that because when i changed the blueprint to try and add functionality the automation that I had already made failed. When i reverted the blueprint it went back to functioning.
Previous blueprints did not do this. So i was wondering if I am missing a 'something' that has it write to the automation all it needs to work?
The previous automations I made from blueprints came from the blueprint repository (well most of the code) and i modified them to fit. That seems to be the only main difference i can think of. any thoughts?

marsh moon
#

Is there a selector that allows the user to input multiple custom string values?

#

I tried the select selector like this:

select:
  options:
    - Enter Playlist URI
  multiple: true
  custom_value: true

And like this

select:
  options:
  multiple: true
  custom_value: true

Both don't allow the input of custom values

quartz lily
#

A select is "choose from one of the following pre-set options". You're likely after a text field

marsh moon
tough zephyr
#

Selest selector returns a list i believe.

tough zephyr
plucky bison
# tough zephyr No idea what you are saying. You need to show me the automation that calls a bl...

the automation, in automations.yaml (which is throwing an error because I deleted the blueprint) . In the automations.yaml it only has:
**

  • id: '1657419456369'
    alias: A1 V2 V23
    description: ''
    use_blueprint:
    path: homeassistant/door_open_monitor_group.yaml
    input:
    notify_device: 83d441734ad32fe726b1e96dc57bc9g
    **
    instead of the usual more detailed automation detail. This is why it does not make sense. Any thoughts as to why this does it when the others made from a previous blueprint do not.
limber osprey
#

Are there any blueprints where you can get notified in the morning if any state changes occurred overnight for any number of different devices?

#

I couldn't locate any on the website

tough zephyr
#

All blueprints require this... Blueprints themselves are the engine, you send it programming inputs. That's how it works. You could not have deleted other blueprints and have an automation that called them still work.

tough zephyr
plucky bison
# tough zephyr If you... ```yaml use_blueprint: path: homeassistant/door_open_monitor_gro...

ok, i think i understand. the blueprints are the framework that the information pass through to generate an outcome. right? The previous blueprints i created are still there because they are functioning. I had to delete the one that is not working after I worked on it and tested to allow the system to save and quit throwing errors. I think i understand their place in the world now and to not delete any when I am working on the system unless i want all the automations created with them to die.

limber osprey
tough zephyr
turbid summit
#

can someone help with with the Doorbell - Notify Alexa and/or Google and send camera snapshot, I installed it and getting the Alexa notification alert, but I should also get the IOS alert via the app with a jpg but that's not working for me

wintry mauve
#

I'm having an issues with the YAMA blueprint only running the ON part, but never attempts to turn OFF my lights

#

I'm looking at the trace, and I can see that it reaches the split point where it decides if the lights should be on or off, but instead of choosing OFF, it just bypasses it and goes around it. and then NEVER turns off

quartz lily
#

That would be because the condition it’s looking for, for the OFF is not fulfilled

wintry mauve
#

The blueprint only asks for the toggle entity, which is my motion sensor. It does say that it has to be something that toggles between on and off, which it does

#

I'm drawing a blank

unborn finch
#

Here's a question which might be a bug report but I'm not quite sure what the intended behavior is supposed to be. When I deploy a blueprint that has boolean toggle switches, and then edit the resulting automation, I am not prompted to save the automation when changing the state of a boolean. I have to go and manually change some other field (say, a text field) before the save button appears. Is this the expected behavior?

#

now that i look into it, this has to be a bug. saving isn't working at all on that example blueprint (and also isn't on my own, actual blueprints). Toggle the booleans all you want, you'll never get a save button. Change the text and you will get a save button, and the new text will be saved, but the boolean state (even if changed), does not get saved.

tough zephyr
unborn finch
#

Just for fun I've been walking back versions on one of my dev instances, seeing similar behavior in 2022.04. Haven't gone back further than that.

#

Are you able to re-create the behavior using the process shown in the report? Trying to figure out if it's just me.

tough zephyr
#

There are a couple of weirdnesses when it reloads the cache or not. Like change the title it won't reload, so you have to touch the description and then it reloads, that kind of thing.
I worked with someone else that had an issue like this with booleans and I thought he also put a case in, but I haven't found it.

#

Bit different but it was what I was remembering, in case it helps.

#

It's probably going to move to the frontend

wide shoal
#

What kind of actions do you use to turn off a motion light?

tough zephyr
#

Turn off the breaker, cut the wire, turn the switch off, paint it black, un-install it, hit it with a hammer.

I'm sorry but that is like asking how to get eggs home from the market. With no details, there is no good answer.

What is controlling it now?

unborn finch
#

date the CEO of the local power utility until you can get access to their credentials to shut down the power grid

tough zephyr
#

Hack a space laser to cut the power wires into your neighborhood.

lethal dragon
#

I'm trying to edit the default motion lights blueprint in order to activate/deactivate motion based on an input bool. https://bpa.st/DWTA - I added the condition and it works fine for the first part. The other challenge is when the lights were already on and the input bool turns off, basically in the time it's waiting for a trigger. How can I keep the lights on? what's the best way to achieve that?

tough zephyr
#

Use the Boolean to turn it on, but use a timer to turn it off. The timer could be reset by the boolean so if the boolean stays on, it could hold the light on. But once the boolean is gone, the timer lets it drop.
Not sure if that fits your case, but it's one way to do it.
https://www.home-assistant.io/docs/scripts/#wait

lethal dragon
tough zephyr
#

I guess I don't know what you are asking. You asked to keep it on longer, I thought.

lethal dragon
#

no, my main issue is not turning off the lights after the boolean is off later. Meaning that the action(s) after wait_for_trigger not execute once the bool is off

tough zephyr
#

OK, just turn the lights off when the boolean goes away.
It's just another automation or another trigger on this automation.

unborn finch
#

also boolean inputs are probably broken right now

lethal dragon
tough zephyr