Nuki integration, determine how the door was opened?

I’ve a Nuki doorlock and the integration into HA is working great. In an Automation I want to know if the door was opened from the outside or from the inside?
From the inside it is never with the Phone or PinPad. From the outside it is always using the Nuki App on the phone (or from HA) or using the PinPad.

I want to enable lights when the door is opened from the outside. Any idea how to determine this?

You could use “sensor.nuki_front_door_state” trigger state “unlatched” which happens when the phone auto unlocks the door or when using the pin pad, but not when you select open door in the app which is strange since it also unlatches.
My light goes on when my phone goes from away to home and the door opens.

Excellent, thanks @ricc I’m going to give this a try.

I agree regarding switching lights when the phone goes from away to home, I’m doing this as well for the living room etc. But I’ve two entries in the house, depending on which entry I use different lights will be switched.

@ricc Where do you find the “unlatched” state? I’ve one Control, one Sensor and one Diagnostic. And the Sensor shows the door open/closed status. Need some help on this one.

I’m having the Nuki 2.0 lock.

I have a Smart Lock 3.0 Pro and use the custom integration GitHub - kvj/hass_nuki_ng: Better support for Nuki devices in the Home Assistant
My setup has a “Nuki Smart Lock” device with sensor.nuki_front_door_state

But I use the wait_for_trigger to switch the lights on when someone switches from away to home and opens the door within a certain time.
You can use it and have different sequences depending on which door was opened, that’s probably more reliable since sensor.nuki_front_door_state doesn’t always give the state “unlatched” depending on how you opened it.

The installation of the Better support for Nuki was completed, but I don’t get a pop-up or I don’t see a configuration screen to configure the Nuke Lock. Any suggestions?

I was using the HA integrated Nuki option.

Follow the installation / configuration part on the GitHub page.