Yale Doorman Lock Integration through Verisure Issue in Homeassistant

I have a Yale Doorman lock that’s integrated with my Homeassistant. Previously, I was able to control the lock through my Veirsure alarm system without any issues. However, after a recent update a couple of months ago, the integration stopped working.

It appears that the problem lies in the number of digits in the Yale Doorman code. Homeassistant now expects a maximum of 4 digits, while the Yale Doorman requires at least 6 digits.

Initially, I had the following code, which functioned correctly:

lock:
  - platform: template
    name: 'Head Entry Lock'
    value_template: "{{ states('lock.entre') }}"
    lock:
      service: lock.lock
      data:
        entity_id: lock.entre
        code: 123456
    unlock:
      service: lock.unlock
      data:
        entity_id: lock.entre
        code: 123456

Since the update, the following error message is displayed:

“Failed to call service lock/unlock. Code ‘123456’ for unlocking lock.entre doesn’t match pattern ^\d{4}$”

To resolve this issue, I attempted to modify the code as follows:

lock:
  - platform: template
    name: 'Head Entry Lock'
    value_template: "{{ states('lock.entre') }}"
    lock:
      service: script.lock_with_code
      data:
        entity_id: lock.entre
        code: 123456
    unlock:
      service: script.unlock_with_code
      data:
        entity_id: lock.entre
        code: 123456

script:
  lock_with_code:
    sequence:
      - condition: template
        #value_template: "{{ trigger.event.data.event == 6 }}"
        value_template: "{{ trigger.event.data.new_state.attributes.code | length == 6 and trigger.event.data.new_state.attributes.code | regex_match('^\\d{6}$') }}"
      - service: lock.lock
        data_template:
          entity_id: "{{ trigger.event.data.new_state.entity_id }}"

  unlock_with_code:
    sequence:
      - condition: template
        #value_template: "{{ trigger.event.data.event == 6 }}"
        value_template: "{{ trigger.event.data.new_state.attributes.code | length == 6 and trigger.event.data.new_state.attributes.code | regex_match('^\\d{6}$') }}"
      - service: lock.unlock
        data_template:
          entity_id: "{{ trigger.event.data.new_state.entity_id }}"

Although this modification eliminates the error message, the Yale Doorman lock no longer responds to lock/unlock commands. It seems as if nothing happens when I attempt to operate it. I have checked the logs, but there is no relevant information available.

Do any of you have insights into what might be causing this problem? Or perhaps you have suggestions on how I can get the integration to work again as it did before? Any help would be greatly appreciated.

Thanks in advance.

I have the same problem.

I’m guessing you haven’t found a solution so far either?

Here is another one with the same issue. All items reports from the Verisure cloud integration but unable to lock/unlock.
Unfortunately I’m in the progress of migrating from a working OpenHAB solution.

Happy to assist in any kind of debugging

/p

Actually it works.
I changed the configuration of the binding to use 6 digits for lock/unlock. Opening the object of the lock and “flipping” the switch asks for a PIN and then performs the action. However just pressing the “LOCK” word on the panel gives error on … “doesnt match pattern”. Probably as it sending a null string.

Is there a way to configure the PIN somewhere?

/p

1 Like

I have the same issue here and suggested fix does not work as desired.

Version 2024.1.0

(Why is it limited to four digits to begin with?)

1 Like

Same issue here. Any news on this topic?

I have not understood the proposed fix, can it be explained very plainly?

Also, question: trying to use the Yale Doorman smart lock in some automations,
HA proposed following triggers from the device:


But none of them seem to work, any of you also tried ?

Thanks in advance, dear community!