public void event (ZoneEvent event) {
    switch (event.getType()) {
      case MOTION:
        env.getNotifyService().sendMotion(name);        
        action(event);
        possibleAlarm(event);
        break;
        
      case OPENED:
        env.getNotifyService().sendDoorOpen(name);
        action(event); 
        possibleAlarm(event);
        break;
        
      case CLOSED:
        env.getNotifyService().sendDoorClosed(name);
        action(event); 
        break;
        
      case RING:
        action(event); 
        break;
        
      case TEMPERATURE:
        scheduleResetTemp();
        setTemperature(event.getValue());
        break;
        
      case HUMIDITY:
        scheduleResetHum();
        setHumidity(event.getValue());
        break;
        
      case BUTTON:
        action(event);
        break;
        
      case MOVIE:
        action(event);
        break;
        
      case COUNT:
        // Electricity ping does not cause action
        break;
    }
  }