Hello,
I’ve had the Nuki 3.0 Pro with a keypad for a year now and I’m very happy with it. I integrated it into Home Assistant from the very beginning. Now I’ve integrated MQTT (Mosquito), which I’m completely new to.
I want the hallway light to turn on automatically when the door is opened from the outside and it’s dark. A corresponding automation in Home Assistant would be very simple. I’m currently still struggling with the MQTT information. When I look at the log, I find the following under “nuki/23232/state”:
I think I found the following:
Payload: 7 (Fingerprint)
Payload: 5 Door was opened
Payload: 3 Door was closed
My question now is: How can I query this in HA and use it in my automation?
The sensors displayed in the HA aren’t helping me. Or am I missing something?
A little help would be very welcome.
Best regards,
Christian
marc
(Marc Mikolits)
March 17, 2025, 8:15am
2
Hi Christian,
State 7 is “Unlatching” not “Fingerprint”.
For a definition of all the states please refer to our MQTT API specification.
If the “Opened” state is sufficient for you, you may create an automation like this:
best,
Marc
Hi Marc,
thanks for your help! The “opened” state is not available, only “opening”. But this would be fine for me.
I’ve just wrote the automation and now i’m waiting for the night to test it. Here is the automation in HA:
alias: Flurlicht
description: >-
Beim Öffnen der Haustüre während der Dunkelheit, das Licht im Flur vorne
einschalten und nach 1min wieder ausschalten
triggers:
- device_id: a52fccd59d1f90821706b10661553833
domain: lock
entity_id: 96166ab61e8e0d7b793b1e7a64b3aaaa
type: opening
trigger: device
conditions:
- condition: sun
before: sunrise
after: sunset
actions:
- type: turn_on
device_id: 10eac1127c8a18d33c9b7d00e8d65d97
entity_id: 68c3808323796b306e523e8952ed79f2
domain: light
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- type: turn_off
device_id: 10eac1127c8a18d33c9b7d00e8d65d97
entity_id: 68c3808323796b306e523e8952ed79f2
domain: light
mode: single
marc
(Marc Mikolits)
March 17, 2025, 9:15am
4
In German it is called “… geöffnet ist”: