Not sure if issue is my code, my new lock or HA?

I bought a new Schlage Zwave lock a few days ago and trying to figure out if there is something wrong with the lock or with my test code.

I have read that the lock sometimes get state wrong (saying lock is locked when really unlocked) .For example under developer> states, the STATE field

is always correct but the ATTRIBUTES field is often wrong.

Long story short:
I made this test code to see if it would obey the conditional state.

When I manually trigger this automation, it acts like the door is always unlocked, even if it’s really locked.

Is my code faulty, the lock or some bug that occurs when automatons are manually triggered?

Thanks

  alias: Door condition test
  trigger:
  - at: '22:15'
    platform: time
  condition:
  - condition: state
    entity_id: lock.schlage_allegion_be469zp_connect_smart_deadbolt_locked
    state: unlocked
  action:
  - data:
      message: The  door is unlocked
    service: notify.notify_name

Manually triggering automations via the services menu ignores conditions and skips straight to the actions. This is by design. Not a bug.

To test your conditions add another easily performed trigger. A ‘test’ input boolean for example.

Appreciate the information as that eliminates that variable and good to know for the future.

I changed the time trigger to a few minutes ahead and it worked fine. When door was locked , no text. When unlocked I got the text so conditional is working like it should.

Thanks!

1 Like