I am trying to get an automation to turn on a scene when I trigger my motion detector. I would also like this automation to only work if the door lock has just been unlocked.
entity:
lock.hovedinngang - when unlocked it will have state “unlocked”
scene.stuekjokkengang_medium
binary_sensor.neo_coolcam_battery_powered_pir_sensor_sensor_2 - when triggered it will have state “on”
Note, above automation will always trigger when the “lock.hovedinngang” has the state unlocked. Doesnt matter how long it has been unlocked. If thats an issue I think that senario could be achived with an aditional input_boolean and automation.