I wrote this code for create a persistent notification when the door left open for x minutes. This is wyze door lock. There is an attribute door _open. I don’t get any errors, but the automation does not run.
alias: New Automation
description: “”
trigger:
- platform: state
entity_id:- lock.front_door
attribute: door_open
to: “true”
from: “false”
for:
hours: 0
minutes: 0
seconds: 1
condition: []
action:
- lock.front_door
- service: persistent_notification.create
data:
message: The front door is left open
title: Security Alert
mode: single