How to add a condition to blueprint

Hi, I’m still struggling to understand how to extend ready-made blueprints sometimes.

In my case, I want to trigger a blueprint only when nobody is at home.

YAML code from the blueprint:

alias: Send a camera snapshot when motion is detected
description: “”
use_blueprint:
path: vorion/send-camera-snapshot-notification-on-motion.yaml
input:
motion_sensor: binary_sensor.flur_motion_motion
camera: camera.floor_cam_mainstream
notify_device: 4bd7ec0846fe2cd85276be089f63867a
is_ios: true
delay: 1

Where and how do I insert my condition? Can someone show me this concretely using my example? I think then I can do the rest on my own

condition:

  • condition: and
    conditions:
    • condition: state
      entity_id: device_tracker.smartphone_chris_homebase
      state: not_home
      for:
      hours: 0
      minutes: 5
      seconds: 0
    • condition: state
      entity_id: device_tracker.smartphone_paulersatz_homebase
      state: not_home
      for:
      hours: 0
      minutes: 5
      seconds: 0
    • condition: state
      entity_id: device_tracker.smartphone_sarah_homebase
      state: not_home
      for:
      hours: 0
      minutes: 5
      seconds: 0

many thanks !

You can check out the documentation for automation conditions here.

But I would suggest making a binary sensor helper for having somebody home instead, so you could easily use that in other automations and have a consolidated place to manage it.

If you just want to know if no one is home, the zone.home entity will have a value of 0 if noone is home. A seperate sensor is not needed for that. It counts the number of people it see’s home.

what is my trigger for the blueprint? how do I insert my condition, unfortunately I don’t understand this even after reading the documentation at the link.

This is only possible if everyone uses the HA app, correct?

No. Other device trackers work as well, you just pair the person with the tracker. Any of the trackers you were going to use to test if they are there can be added to the person.
Person - Home Assistant.

Setting up presence detection - Home Assistant.

Also if you are looking for specifics on how to use that specific blueprint, the author likely has documentation in the exchange post or site you got the BP from, or else ask questions about that there where other people that use the BP are watching. They know how that BP works and can help better.

Thanks for the tip about the people. I have now specified other device trackers. I’ve overlooked.

The general problem I have is that I don’t know how to insert a condition into blueprints. It’s not specifically for one but rather for a few more. The blueprints are really great, but in my case only if I can use conditions there. And after hours of reading, I just don’t understand it. But I’m not a programmer either.

Automation blueprints are basically automations. Conditions need to be added to the blueprint code, not the automation that you use to call the blueprint. They get added to the stuff you downloaded from the other person.

Ahhhh, ok. Thank you very much for your explanation.

Did you end up figuring out how to do that? I am looking potentially modifying that blueprint as well as it’s great but sometimes when we and kids are home it drives me crazy and would love to do similar.

I have found this, and it works perfect for me :

Hello its working fine just a notification is slow. Sometime take 5 min.

I using a NUC PC with 16gb ram.
I dont think a hardware is a issue

How can i speed up the notification?

Thanx

Gabriel

Wrong Thread ….