Dahua VTO custom integration

Hello,
I don’t have door sensor connected to VTO so I can only assumes that you should receive event when door is open and when door is close.

If you have this automation you should see all events coming from VTO, try to clear all persistent notification, open then close door and write down all events which you get. Try this test few times if you get events looks like open/close door when I can help you with door sensor, basically it’s will look same as Door Lock sensor but will use different events to change state. You can try do do it by your self use HA input_boolean as storage for the state when turn it on when you get open door event and turn it off then you get door close event.