Dear Alessandro,
thank you for your feedback. You are right - a reed sensor is a nice add on.
I just mentioned it because in your automation you are analyzing the POST-request-payload (callback/webhook) which comes in three different versions according to the official Nuki Bridge documentation (https://developer.nuki.io/page/nuki-bridge-http-api-1-12/4)
(normal, with sensor, with opener).
Your code works with sensor only because you read out doorsensorState (which is not available in the json map if you do not have the sensor).
{{ my_state[trigger.json.doorsensorState] }}
A “no sensor-version” of your automation would be fine.
And by the way: Forza squadra azzurra!
Walter