Need help creating blueprint

Can someone help me making a blueprint? I can’t figure it out myself.

I would like to get my garden lights on when the sun goes down, but only when person x, y or z is at home. Based on the presence of a mobile phone which is present in the WiFi network and that the garden lighting switches off at an adjustable time. It has to run each evening.

I would greatly appreciate it.

Why not create an automation instead of a blueprint?

Once you have created the automation, you can decide if you want to take the extra step of converting it to a blueprint.

1 Like

I can not get it done, with te standard automation.

i have a similar blueprint for my heating with presence detection and i also like to have the presence detection for my garden lights.

just Break it down

what are the

trigger:
bla bla

condition
bla bla

and the Action
action

Now you mite need some helper to help get the condition right

Sure you can. Blueprints simply generate automations defined within the blueprint.

Is there anyone willing to help me make a blueprint?
Instead of posting comments that I really can’t do anything with!

This is what I’ve been able to make so far, I can select the blueprint select the right variables. But when saving, it is not saved as an automation. Something’s in the code is not right.

Help is much appreciated!

Code:

blueprint:
  name: Light off when away
  description: Only turn on the lights when someone is home.
  domain: automation
  input:
    target_light:
          name: Lights to use
          description: These are the light to use in this automation
          selector:
            target:
              entity:
                domain: light
    target_trigger:
        name: Trigger type
        description: Choose trigger
        default: "sunset"
        selector:
          select:
            options:
              - "sunset"
              - "time"
    elevation_shift:
        name: Elevation Shift, if triger is set to sunset
        description: Using an elevation offset (height of sun relative to the horizon) to shift the sunset trigger, either earlier or later. Positive values bring the automation start time forward, whilst negative values delay the start time. To approximate Golden Hour - set the Elevation Offset to 1.
        default: 0.0
        selector:
          number:
            mode: slider
            min: -3.0
            max: 3.0
            step: 1.0
    trigger_time:
        name: Manual time, if triger is set to time
        description: Time to trigger
        default: "18:00:00"
        selector:
          time:
    person1:
      name: Person 1
      description: The first person that has to be home.
      default: []
      selector:
        entity:
          domain: person
    person2:
      name: Person 2
      description: The second person that has to be home.
      default: []
      selector:
        entity:
          domain: person
    person3:
      name: Person 3
      description: The third person that has to be home.
      default: []
      selector:
        entity:
          domain: person
    person4:
      name: Person 4
      description: The fourth person that has to be home.
      default: []
      selector:
        entity:
          domain: person
    person5:
      name: Person 5
      description: The fifth person that has to be home.
      default: []
      selector:
        entity:
          domain: person
    time_off:
      name: Time Off
      description: After this time the lights turn off, This to prevent the lights are on in the middle of the night
      default: '23:00:00'
      selector:
        time:
variables:
  trigger_variables:
    target_light:    !input "target_light"
    target_trigger:  !input "target_trigger"
    trigger_time:    !input "trigger_time"
    time_before:     !input "time_off"
Trigger:    
     platform: numeric_state
     entity_id: sun.sun
     attribute: elevation
     below: elevation_shift 
action:
  - choose:
      - conditions:
              - condition: time
                before: !input 'time_off'
              - condition: or
                Conditions:
                - condition: state
                  entity_id: !input 'person1'
                  state: home
                - condition: state
                  entity_id: !input 'person2'
                  state: home
                - condition: state
                  entity_id: !input 'person3'
                  state: home
                - condition: state
                  entity_id: !input 'person4'
                  state: home  
                - condition: state
                  entity_id: !input 'person5'
                  state: home
        default:
      - service: light.turn_on
        target: !input target_light
          
mode: single 

When I suggested you first create an automation you said you can’t make an automation to do what you want. If your intended application cannot be implemented as an automation then it definitely can’t be implemented as a blueprint. A blueprint generates an automation.

The example you posted contains syntax errors (key words must be in lower-case whereas you have several in title-case) and indentation errors (like the service call for default).

I highly recommend you first create an automation using the Automation Editor. It will produce YAML that is free of syntax and indentation errors. Once you have confirmed the automation works correctly, you can convert it to a blueprint.