Lock template - push button

is something changed in the code?
in the past mine configuration worked, but i can’t unlock mine garagecover anymore. command isn’t send out


i can lock mine garagecover using the lock button, (i see that the switch is triggered)
but when i try to unlock the switch is not triggered.

1 zwave push button to open/close
1zwave sensor to check status

any suggestions?

lock:
  - platform: template
    name: Garagepoort
    value_template: "{{ is_state('binary_sensor.garagepoort', 'off') }}"
    lock:
      service: switch.turn_on
      data:
        entity_id: switch.garagepoort
    unlock:
      service: switch.turn_off
      data:
        entity_id: switch.garagepoort

When you tried to unlock, was the binary_sensor showing the correct state?

yess, sensor is showing correct state!

same switch to open close… unlocked, it triggers,
locked, no trigger on switch

when i trigger the switch (not the lock) the garagecover opens…

    optimistic: true

Why should that help?

And the lock also showed the correct state when you tried to unlock it?

read the docs, or, just do it.


OPTIMISTIC MODE

This example shows a lock in optimistic mode. This lock will immediately change state after command and will not wait for state update from the sensor

Mine lock is showing the correct state. But thé switched isn’t fired for unlock.

State changes when the cover opens. I can open the cover when I fire the switch. But thé unlock command doesn’t send a command tot the switch

so you didn’t try. there’s a reason I asked

no logs

only part of all relevant config posted


I’m out

Ok,
so I tried the optimistic mode,
but like i thought

optimistic mode: true
i trigger the unlock botton -> stil no trigger to the switch -> state change to unlock -> but cover keeps locked

The switch that opens/closes the garage door, how is it configured? And the switch works as expected just the lock not?


cover is locked:

8:08:45 : i push the unlock button in lovelace - > cover keeps close, state changes to unlock because of optimistic= true

8:08:57 i push the lock button in lovelace (status is unlocked because of optimistic) -> switch is now triggered (because it wants to lock) -> cover opens

8:09:29 i push the lock button in lovelace: normal reaction-> cover closes

switch is configed as an auto-off (push button) (zwave configuration)
for closing it workes fine, it’s just not triggerd to open

ok, finaly founf mine mistake!
image

   unlock:
      service: switch.turn_on

i had to turn the switch ON again instead of OFF… :man_facepalming: