Motion turn on switch with elevation and second condition

Hi all. I create blueprint to turn on switch after detect motion and sun elevation. But i want also add second condition to check that this switch is off. Because when is ON automation no runs. Please help me how i can add second condition to verify that switch from trigger is OFF… Thanks

https://github.com/pepsonEL/HAblueprints/blob/508fa02391314a7c1318928a169add21a0633873/motion_switch_elevation.yaml

You created? you mean you copied from me :wink: Motion detect lights with solar elevation check

Yes true but i only change for me to switch because i have light on switch entity.

You have posted in the wrong place. “Blueprint Exchange” is for sharing working blueprints. If you have questions about creating or enhancing blueprints, use the “Blueprint” tag, optionally combined with the “Configuration” tag.

Also, if you create a blueprint based on someone else’s blueprint, it’s common courtesy to mention the author.

1 Like

I suggest edit the automation like this: (not tested)

alias: 'Blueprint: Motion-activated light with Elevation: Driveway'
description: ''
use_blueprint:
  path: reinder83/motion_light_with_elevation.yaml
  input:
    below_elevation: 3
    motion_entity: binary_sensor.pir_driveway
    light_target:
      entity_id: light.driveway_light

condition:
- '{{ state_attr(''sun.sun'',''elevation'') <= (below_elevation | float)}}'
- condition: state
  entity_id: 'switch.your_other_device'
  state: 'on'
1 Like

But if i want select in automation switch and state ?

Is any chance to you can help me with add this to blueprint to select state and switch in condition when create automation by blueprint ? Please…