On door open - Logic problem

See the StateChangeDetection example.