ZW500DM In-wall Smart Meter Dimmer Switch is not working properly

Do you really need the imports? Everything in org.eclipse.smarthome.core.types should be imported for you by default.

Use a latch. The example there uses a ReentrantlLock but you could accomplish the same thing with a timestamp for something like this.