Platform: State wont work due to slow update from Verisure

Hello
I would like my door to lock automatically every time it is closed between 2100 and 0700.
Made this automation, but it only works when the door switch changes state from “on” to “off”. And with a 40sec delay for updating status from Verisure it normally wont sense that the door has been opened and closed.

Any suggestions for modifications, or to speed up the update time from Verisure?

- alias: Lås dør
  trigger:
    platform: state
    entity_id: binary_sensor.mk_inngangsdr
    to: 'off'
  condition:
    condition: time
    after: '21:00:00'
    before: '07:00:00'
  action:
    service: lock.lock
    data:
      code:  !secret verisure_lock_code
      entity_id: lock.hoveddr

I was thinking I could use state: 'off' instead of to: 'off'but that did not work…